Skip to content

feat: add CMF description field and path-policy list include param - #24

Open
SwarnimDoegar wants to merge 1 commit into
dashboard-sdkfrom
feat/cmf-description-and-path-policy-include
Open

feat: add CMF description field and path-policy list include param#24
SwarnimDoegar wants to merge 1 commit into
dashboard-sdkfrom
feat/cmf-description-and-path-policy-include

Conversation

@SwarnimDoegar

Copy link
Copy Markdown

Summary

Mirrors image-server-dashboard PR #106 in the dashboard SDK spec (dashboard-sdk branch). Two independent changes.

1. Custom metadata field description

Optional description (string, max 500 chars), independent of the existing label/schema mutual-requirement.

  • POST /api/v1/customMetadataFields — accept optional description.
  • PATCH /api/v1/customMetadataFields/{id} — accept optional description (send an empty string to clear). Updated the summary and 400 error examples to match the backend.
  • CustomMetadataField response schema — expose description (present only when set; not required).

2. Path-policy list include query param

  • GET /api/clients/{clientNumber}/path-policy — added optional include query param (comma-separated; currently only customMetadataFields). When folderPath is not provided, include=customMetadataFields expands each policy's configured custom metadata fields. Unknown tokens are ignored.
  • PathPolicyListItem.customMetadataFields — the array is now populated in two cases with different item shapes, modeled as a oneOf:
    • via folderPath → merged fields (PathPolicyCustomMetadataFieldMerged, augmented globals, selected only)
    • via include=customMetadataFields → the policy's raw stored overrides (PathPolicyCustomMetadataFieldInput)

Validation

  • YAML parses (openapi: 3.1.0, info.version: 2.0.0).
  • description present with maxLength: 500 in POST request, PATCH request, and the response component; absent from the component's required.
  • label/schema required-if wording unchanged (no coupling to description).
  • list_path_policies query params: folderPath, include; customMetadataFields items = oneOf[Merged, Input].
  • All local $ref targets resolve.

No stainless-config/main.yaml change required (no new methods / renamed operationIds); the operationId sync script was not run since nothing it manages changed.

Mirror image-server-dashboard PR #106 in the dashboard SDK spec:

Custom metadata fields:
- POST /api/v1/customMetadataFields: accept optional `description` (string, max 500 chars)
- PATCH /api/v1/customMetadataFields/{id}: accept optional `description`
  (send an empty string to clear it)
- CustomMetadataField response schema: expose `description` (present only when set)

Path policies:
- GET /api/clients/{clientNumber}/path-policy: add optional `include` query
  param (comma-separated; `customMetadataFields` expands each policy's
  configured custom metadata fields when `folderPath` is not provided)
- PathPolicyListItem.customMetadataFields items now allow either the merged
  shape (folderPath lookup) or the configured/input shape (include expansion)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant