-
Notifications
You must be signed in to change notification settings - Fork 18.2k
json-schema-to-grammar improvements (+ added to server) #5978
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
106 commits
Select commit
Hold shift + click to select a range
09248e0
json: fix arrays (disallow `[,1]`)
2d9580a
json: support tuple types (`[number, string]`)
3c339ce
json: support additionalProperties (`{[k: string]: [string,number][]}`)
1daaf30
json: support required / optional properties
1428a85
json: add support for pattern
12f0d7e
json: resolve $ref (and support https schema urls)
ea4244e
json: fix $ref resolution
82ade9f
join: support union types (mostly for nullable types I think)
f6f851b
json: support allOf + nested anyOf
bc0e0d9
json: support any (`{}` or `{type: object}`)
148555c
json: fix merge
ed24688
json: temp fix for escapes
c5bc154
json: spaces in output and unrestricted output spaces
5827ff4
json: add typings
be13247
Merge remote-tracking branch 'origin/master' into json-fixes
06b04e9
json:fix typo
21ac451
Create ts-type-to-grammar.sh
a78eb4a
json: fix _format_literal (json.dumps already escapes quotes)
d5ef412
json: merge lit sequences and handle negatives
4e7c26c
json: handle pattern repetitions
660e832
Update json-schema-to-grammar.mjs
add8fee
Create regex-to-grammar.py
1cde8de
json: extract repeated regexp patterns to subrule
259f350
Update json-schema-to-grammar.py
b061de5
Update json-schema-to-grammar.py
ba57964
Update json-schema-to-grammar.py
f37ad0a
json: handle schema from pydantic Optional fields
307110a
Update json-schema-to-grammar.py
ee492c9
Merge remote-tracking branch 'origin/master' into json-fixes
5764d9f
Update json-schema-to-grammar.py
364bf9e
Update ts-type-to-grammar.sh
8597caa
Update ts-type-to-grammar.sh
dab2ea9
json: simplify nullable fields handling
ade339d
json: accept duplicate identical rules
e8b78c2
json: revert space to 1 at most
37b59d1
json: reuse regexp pattern subrules
e8f25d6
json: handle uuid string format
54291e1
json: fix literal escapes
f57b467
json: add --allow-fetch
d1fda6f
json: simplify range escapes
478f62e
json: support negative ranges in patterns
27b1fef
Delete commit.txt
0e94941
json: custom regex parser, adds dot support & JS-portable
11813a6
json: rm trailing spaces
5389820
Update json-schema-to-grammar.mjs
4e2d06c
json: updated server & chat `( cd examples/server && ./deps.sh )`
c8254e5
json: port fixes from mjs to python
56b8744
Update ts-type-to-grammar.sh
d736e92
json: support prefixItems alongside array items
9a61802
json: add date format + fix uuid
e1ed7a0
json: add date, time, date-time formats
b816734
json: preserve order of props from TS defs
d0dd75c
json: port schema converter to C++, wire in ./server
51ca7cb
json: nits
cb364ef
Merge branch 'json-fixes' into json-fixes-cpp
d934adc
Update json-schema-to-grammar.cpp
8caaf16
Update json-schema-to-grammar.cpp
8fee84b
Update json-schema-to-grammar.cpp
0be059d
json: fix mjs implementation + align outputs
a740bfa
Update json-schema-to-grammar.mjs.hpp
192a58a
json: test C++, JS & Python versions
7e1440c
Merge branch 'json-fixes-cpp' into json-fixes
917b5d2
json: nits + regen deps
ee6166a
json: cleanup test
6165c55
json: revert from c++17 to 11
bed826f
json: nit fixes
59c899d
json: dirty include for test
3feac66
Merge remote-tracking branch 'origin/master' into json-fixes
f216550
json: fix zig build
5a7deb2
json: pass static command to std::system in tests (fixed temp files)
3b3ad94
json: fix top-level $refs
235ff68
json: don't use c++20 designated initializers
daceced
nit
5714487
json: basic support for reserved names `{number:{number:{root:number}}}`
af31aa2
Revamp test cmake to allow args (WORKING_DIRECTORY needed for JSON test)
842eb83
json: re-ran server deps.sh
5602a8b
Merge remote-tracking branch 'origin/master' into json-fixes
f30d6c2
json: simplify test
391b17e
json: support mix of additional props & required/optional
64799ba
json: add tests for some expected failures
5c50ffa
json: fix type=const in c++, add failure expectations for non-str con…
84e383c
json: test (& simplify output of) empty schema
3e1bf44
json: check parsing in test + fix value & string refs
edbd2e9
json: add server tests for OAI JSON response_format
20869ed
Merge remote-tracking branch 'origin/master' into json-fixes
6182478
json: test/fix top-level anyOf
bbd7080
json: improve grammar parsing failures
dd922a4
json: test/fix additional props corner cases
24f0b94
json: fix string patterns (was missing quotes)
bd96df4
json: ws nit
05fd7e3
json: fix json handling in server when there's no response_format
e7de643
json: catch schema conversion errors in server
02e3bde
json: don't complain about unknown format type in server if unset
263a86e
json: cleaner build of test
874599e
json: create examples/json-schema-pydantic-example.py
7fc759b
json: fix date pattern
7628bd8
json: move json.hpp & json-schema-to-grammar.{cpp,h} to common
10ee30f
json: indent 4 spaces
6dcf856
Merge remote-tracking branch 'origin/master' into json-fixes
df00efb
json: fix naming of top-level c++ function (+ drop unused one)
d0600d9
json: avoid using namespace std
9260350
json: fix zig build
b8c0025
Update server.feature
ad6c475
json: iostream -> fprintf
c26e7b8
json: space before & refs for consistency
4c46aec
json: nits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
json: cleaner build of test
- Loading branch information
There are no files selected for viewing
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
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
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move
json.hppandjson-schema-to-grammar.hfromexamples/servertocommonThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done