Repository navigation
Conversation
OpenApiVisitor copied the JSON Schema definitions unchanged, including the $decorators key on type and property schemas. Open API 3.0 schema objects only allow extension keys that start with x-, so redocly rejected the output for any decorated model. Rename the key to x-concerto-decorators in the Open API output, and run the model-base and agreement verification cases that this unblocks. JSON Schema output is unchanged. Closes accordproject#299 Signed-off-by: Anugrah <anugrahsengar92@gmail.com>
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
|
This is my first contribution here, so the workflows are waiting for approval. Could a maintainer approve the CI run when convenient? Thanks! |
|
Thanks for your first contribution to Accord Project, and for the clear description of the OpenAPI 3.0 issue in #299. The CI workflows have now been approved and are passing. The change is waiting for review from the Concerto maintainers; they review as time allows, and we are working to shorten that wait. If you push further changes, the checks will run again, and it helps if the commits are signed off (DCO). Drafted by an Accord Project agent, reviewed by a maintainer. |
There was a problem hiding this comment.
Thank you, anugrah55, for a careful first contribution. I read the change against JSONSchemaVisitor and found nothing to fix. renameDecorators covers every place the JSON Schema visitor writes $decorators: class and enum schemas, primitive properties, $ref and anyOf properties, the array wrapper, and relationship properties. Map properties return early without decorators. A targeted rename also leaves default values and decorator arguments untouched, and the JSON Schema output is unchanged. The new unit test asserts the renamed keys on each of those cases and the absence of $decorators, the snapshot changes follow directly from the fix, and the verification skips are updated to match. The two design questions you raised (the x-concerto-decorators key name, and fix versus fix! with a MIGRATION.md entry) are for the maintainers to decide, and the docs follow-up you noted is a sensible plan. Nothing here blocks the merge; it now needs a maintainer's approval.
No problems found.
Automated review by Mira, an Accord Project agent, at 196cf9c. Findings are labelled blocking, should-fix or nit; a maintainer makes the final call.
Closes #299
OpenApiVisitorcopied the JSON Schema definitions intocomponents.schemasunchanged, including the$decoratorskey on decorated types and properties. Open API 3.0 schema objects only allow extension keys that start withx-, so redocly rejected the output for any decorated model.Changes
OpenApiVisitorrenames$decoratorstox-concerto-decoratorson each definition and on each of its properties. These are the only placesJSONSchemaVisitorwrites decorators, and a targeted rename leaves user data such asdefaultvalues and decorator arguments alone. JSON Schema output is unchanged (its snapshot still has$decorators).model-baseandagreementOpenAPI verification cases are no longer skipped and passredocly lint.hr_integration's OpenAPI skip reason now names only the mapschemawrapper (JSONSchemaVisitor: map properties are emitted as { "schema": {...} }, so map values are never validated #292/fix(jsonschema): emit map property schemas directly and apply their key and value types #293), which is its only remaining redocly error; it reuses thecollectionsizewording.Flags
$decoratorsfromopenapi.json. The concerto-docs OpenAPI page andaccordproject/apap'sopenapi.jsonstill show$decorators; no code in the org reads the key back. The docs page would need a follow-up.hr_integrationskip line intest/verification/cases.js. Whichever lands second should keep the text without$decorators.npm teston Node 24.15 (macOS): 721 passing, coverage gate met,openapivisitor.jsat 100%. OpenAPI output is checked with redocly bytest/verification/openapi.validate.test.js;model-baseandagreementnow pass there, and CI'sverify-openapipasses.verification/corpus/manifest.jsonhas no OpenAPI skips to update.Questions for maintainers
x-concerto-decorators, as proposed in bug: OpenAPI output keeps$decoratorsfrom JSON Schema, which OpenAPI 3.0 schema objects do not allow #299, because Open API 3.0 only allowsx-extension keys and the prefix says where the data comes from. It has not been confirmed there; happy to change it.fixrather thanfix!, because the old output failed OpenAPI validation and fix(avro): drop the version from Avro namespaces #290 treated a similar output change the same way. If you would rather mark it breaking, I can change the type and add a section toMIGRATION.md.Author Checklist
--signoffoption of git commit.mainfromfork:branchnameAI usage