feat: add optional description field to custom metadata field API - #23
Open
SwarnimDoegar wants to merge 1 commit into
Open
feat: add optional description field to custom metadata field API#23SwarnimDoegar wants to merge 1 commit into
SwarnimDoegar wants to merge 1 commit into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Introduces the optional
descriptionfield on the custom metadata field public API, mirroring the backend change in image-server-dashboard PR #106.descriptionis a string, max 500 characters, optional and is an independent field — it does not affect the existinglabel/schemamutual-requirement on update.Changes (
openapi/v1.0.0.yaml)/v1/customMetadataFields— accept optionaldescriptionin the request body./v1/customMetadataFields/{id}— accept optionaldescription(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).CustomMetadataFieldresponse schema — exposedescription(present only when set; not inrequired). This flows to the GET list, POST 201, and PATCH 200 responses.No
stainless-config/main.yamlchange is required — the model derives from the schema component and inline request bodies.Validation
openapi: 3.1.0).descriptionpresent withmaxLength: 500in POST request, PATCH request, and the response component.descriptioncorrectly absent from the component'srequiredlist.label/schemarequired-if wording unchanged (no coupling todescription).$reftargets still resolve.