Comments (5)
Awesome. Your issue and question were totally valid btw. I wanted to give you a realistic expectation what I'll be able to do right now as I'll travel after next week.
Is required a valid json schema tag? If yes, it might be correct to support it by default.
from ts-json-schema-generator.
Thanks, sorry if I read too much into that it had been a long day and my question was confusing because I had conflated the AJV error as coming from this library which then confused me about what was/wasn't supported.
Yeah its a valid tag for object
: https://json-schema.org/understanding-json-schema/reference/object#required
The usage of it with { $data: jsonPointer }
is an AJV specific thing as $data
never made it into the official spec: json-schema-org/json-schema-spec#51
I've made a PR to add it here: #1789 with some test cases for the above.
from ts-json-schema-generator.
Sorry, I don't have cycles to look into answering questions. If you want an enhancement to this library, can you send a pull request?
from ts-json-schema-generator.
Sorry, I don't have cycles to look into answering questions. If you want an enhancement to this library, can you send a pull request?
I'm trying to gauge whether it is an existing feature or not first as I couldn't find documentation on the tags and what syntax is supported.
Maybe I could have framed the question better but there is no need to be snarky. I framed the question as a yes or no answer I'm not asking you to do my homework.
By your response I presume it's no.
from ts-json-schema-generator.
My bad this is working as I wanted as long as "required"
is passed to extraTags
the error above is an AJV validation issue, this is creating the Schema as I wanted. 👍
from ts-json-schema-generator.
Related Issues (20)
- Expose parsing of a symbol HOT 1
- Publish NPM release HOT 1
- Imported types are converted into strings in literal expression
- The @discriminator tag does not handle `ref` type discriminators
- TypeError: Invalid value used as weak map key HOT 2
- Missing $id prefix in $ref HOT 3
- Bun.sh support HOT 2
- Type override when compile same type name from different ts file to one json schema HOT 2
- Prevent simplification of UnionType HOT 1
- Add patterns to object property names
- Duplicate (nested) discriminator union values not allowed
- Invalid schema generated with circular dependencies - minimal case
- Errors out with mentions of @types/mocha HOT 1
- Function with generic keyof param crashes HOT 1
- Issue Generating JSON Schema for Types with Indexed Access References
- Error: Unknown node "Primitive" (ts.SyntaxKind = 162) in specific Type example HOT 8
- Generate a schema with an enum only includes the enums numeric values HOT 4
- Documentation of annotations ? HOT 1
- Enhancement: support polymorphic arrays
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ts-json-schema-generator.