Fix/explicit validation message zod#27
Conversation
🦋 Changeset detectedLatest commit: 6dcf884 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
b8cfe83 to
a33ae17
Compare
|
Hey @XaaXaaX This ref stuff, from what I understand looking now we may need something like this https://github.com/APIDevTools/json-schema-ref-parser? I'm looking at the output of the (AI Response I used) The $ref fields you're seeing in your OpenAPI document are part of the OpenAPI specification itself, which defines how you refer to reusable components (like schemas) within the document. These are not internal YAML references (like &1 and *1), but rather are specific to OpenAPI for referencing schemas elsewhere in the document. The noRefs: true option in js-yaml only controls whether YAML-specific references (anchors and aliases) are created. It doesn't modify the content of your document or remove any $ref fields that are part of your OpenAPI spec. The stuff we are doing with the YML is removed YML references not the OpenAPI references, from what I understand like our AsyncAPI one we want to flattern the $ref values to be real values and I believe this would work https://github.com/APIDevTools/json-schema-ref-parser Does that make sense? |
|
@boyney123 The first issue raised was about the x-parser-XXXXXX and other metadata that make the final spec verbose and hard to read by humain this was regarding asyncapi etc... The $ref in a spec to me seems normal because you have the ref to components and it works this way (openApi, swagger or asyncapi) being parsed or not the refs will exist. there is no value to flattening an spec. |
|
@boyney123 This PR now contains only zod validation |
abc33e5 to
379199d
Compare
379199d to
6dcf884
Compare
Motivation
The fix resolve the technical exception while the consumers forget to add the mandatory service id while upgrading to version 2.0.0