Giter VIP home page Giter VIP logo

Comments (5)

domoritz avatar domoritz commented on May 23, 2024 1

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.

georeith avatar georeith commented on May 23, 2024 1

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.

domoritz avatar domoritz commented on May 23, 2024

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.

georeith avatar georeith commented on May 23, 2024

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.

georeith avatar georeith commented on May 23, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.