Skip to content

feat: add optional description field to custom metadata field API - #23

Open
SwarnimDoegar wants to merge 1 commit into
mainfrom
feat/cmf-description-field
Open

feat: add optional description field to custom metadata field API#23
SwarnimDoegar wants to merge 1 commit into
mainfrom
feat/cmf-description-field

Conversation

@SwarnimDoegar

Copy link
Copy Markdown

Summary

Introduces the optional description field on the custom metadata field public API, mirroring the backend change in image-server-dashboard PR #106.

description is a string, max 500 characters, optional and is an independent field — it does not affect the existing label/schema mutual-requirement on update.

Changes (openapi/v1.0.0.yaml)

  • POST /v1/customMetadataFields — accept optional description in the request body.
  • PATCH /v1/customMetadataFields/{id} — accept optional description (send an empty string to clear an existing description). Updated the operation summary and the 400 error examples to match the backend (Either label, description or schema should be provided., description must be a string, description must be at most 500 characters).
  • CustomMetadataField response schema — expose description (present only when set; not in required). This flows to the GET list, POST 201, and PATCH 200 responses.

No stainless-config/main.yaml change is required — the model derives from the schema component and inline request bodies.

Validation

  • YAML parses cleanly (openapi: 3.1.0).
  • description present with maxLength: 500 in POST request, PATCH request, and the response component.
  • description correctly absent from the component's required list.
  • label/schema required-if wording unchanged (no coupling to description).
  • All local $ref targets still resolve.

Introduce the optional `description` field (string, max 500 chars) on the
custom metadata field public API, mirroring the backend change:

- POST /v1/customMetadataFields: accept optional `description`
- PATCH /v1/customMetadataFields/{id}: accept optional `description`
  (send an empty string to clear it)
- CustomMetadataField response schema: expose `description` (present only
  when set)

The `label`/`schema` mutual-requirement is unchanged; `description` is an
independent optional field.
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