fix: generate valid OpenAPI 3.1 documents#210
Open
mrlubos wants to merge 1 commit intorhinobase:mainfrom
Open
Conversation
f3cdffb to
f706256
Compare
mrlubos
commented
Jan 10, 2026
Comment on lines
219
to
226
| "items": [ | ||
| { | ||
| "type": "string", | ||
| }, | ||
| { | ||
| "type": "number", | ||
| }, | ||
| ], |
Comment on lines
238
to
242
| const result = await raw.schema.toOpenAPISchema({ | ||
| target: 'draft-2020-12', | ||
| }); |
Author
There was a problem hiding this comment.
We probably want to pass this only for Valibot since other vendors might have different options
f706256 to
64cfb80
Compare
mrlubos
commented
Jan 10, 2026
Comment on lines
+220
to
+227
| "prefixItems": [ | ||
| { | ||
| "type": "string", | ||
| }, | ||
| { | ||
| "type": "number", | ||
| }, | ||
| ], |
| } | ||
| `; | ||
|
|
||
| exports[`arktype > with options 1`] = ` |
Author
There was a problem hiding this comment.
But other tests fail as a result
Comment on lines
+238
to
+242
| const result = await raw.schema.toOpenAPISchema({ | ||
| options: { | ||
| target: 'draft-2020-12', | ||
| }, | ||
| }); |
Author
There was a problem hiding this comment.
So we want to ensure this is applied only to Valibot
commit: |
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.
@MathurAditya724 this one is WIP. I opened related pull requests in standard-community/standard-json#10 and standard-community/standard-openapi#10.
Let me explain what's going on, there are a few problems:
@valibot/to-json-schema@1.5.0added support for draft 2020-12, so in theory as long as I pass options, I should be good. But even passing options doesn't work for me. I suspect it's because my environment still uses 1.3.0, hence me trying to bump all minimum versionsPerhaps the other pull requests aren't needed since I'm able to generate correct schemas here.