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)
- Get return type from ArrowFunction HOT 2
- Allow --expose option to be a list of named types
- Add support for HTML-like (Vue, Svelte) files that have <script lang="ts"> elements HOT 1
- Handle const like enum with only one option HOT 2
- Add LiteralType as array accessor
- Lowercase type breaks with a comment HOT 1
- Bug: `ReferenceError: structuredClone is not defined` HOT 4
- constant number is converted to a generic `number` type HOT 4
- How to exclude underscore properties from json schema ? HOT 1
- Issues with generation of Union Type of Union Type on a Record HOT 1
- Argument of type 'Config' is not assignable to parameter of type 'CompletedConfig' in ts-json-schema-generator 2.0.0 HOT 2
- "foo" | "bar" | string; should not only map to a string HOT 9
- Improved Promise handling to support packages like Prisma HOT 1
- Literal and Record<never, never> crates empty object HOT 1
- Cannot migrate to version 2 due to typescript error type CompletedConfig HOT 2
- [Bug]: Error when using the binary (v2.1.0) HOT 9
- V2 creates empty definitions after updating from V1 HOT 5
- CLI usage is throwing an error with node 22 HOT 3
- RegExp types are now emitted, breaking schema validation (v2.1.1) HOT 1
- Error when following exports?
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.