Giter VIP home page Giter VIP logo

Comments (9)

G-Rath avatar G-Rath commented on May 26, 2024 1

Bugger, seems there already is one: bcherny/json-schema-to-typescript#201

from schemastore-updater.

G-Rath avatar G-Rath commented on May 26, 2024 1

So I made a PR updating the schema so that the types should now be correctly generated, which has been merge.

I think all that's left is to regenerate the typescript definitions & publish them?

from schemastore-updater.

ffflorian avatar ffflorian commented on May 26, 2024 1

@schemastore/package 0.0.4 was just published.

from schemastore-updater.

ffflorian avatar ffflorian commented on May 26, 2024

Hi @G-Rath, thanks for the info. I'll have a look!

from schemastore-updater.

G-Rath avatar G-Rath commented on May 26, 2024

Any update on this?

When I generate the schema here (which is apparently also using json-schema-to-typescript, like this repo), it doesn't generate the same output; notably it just has [k: string]: any; at the end. (it does still put [k: string]: string; for line 231).

Interesting using the repo own hosted version of the library gives something more similar to what this repo has, except [k: string]: any; instead of the [k: string]: { [k: string]: any; }.

If theres anything I can do to help speed this issue along, let me know :)

from schemastore-updater.

ffflorian avatar ffflorian commented on May 26, 2024

@G-Rath
I rebuilt all schemas and there were no changes for package, so AFAIC I can't do anything about the wrong definition file.

I am using json-schema-to-typescript version 6.1.3 while transform.now.sh uses version 4.6.5 (and the hosted site might use a different version, too).

Could you please open an issue at https://github.com/bcherny/json-schema-to-typescript/issues and link this issue here? Thanks!

from schemastore-updater.

ffflorian avatar ffflorian commented on May 26, 2024

@G-Rath unfortunately there is no new version on npm yet. As soon as there is a new version out, I will re-build all schema files.

Sorry, I misunderstood your comment. I will re-generate the schemas now.

from schemastore-updater.

G-Rath avatar G-Rath commented on May 26, 2024

@ffflorian awesome, thanks!

Don't forget to push - the commits are not on github yet ;)
(but I can confirm that the package now compiles properly)


Just as a general heads up, there are more schema typings like this, and at least a couple that are invalid for other reasons (off the top of my head, arvo is invalid b/c it has a circular type definition).

The problem w/ the generator should hopefully be solved once I get around to implementing the --strictIndexSignatures in the JS2T package.

I think it could be valuable if schemastore-updater supported checking the generated schemas - even just a function that chucks each definition file into the ts compiler and logging the errors would give enough information to go on.

Let me know if you'd be interested in taking this further w/ me - while the core of schemastore-updater is pretty much feature-complete for its primary purpose, I think it could easily help expose places for improvement in both JS2T & the schemas on the store 😄

from schemastore-updater.

ffflorian avatar ffflorian commented on May 26, 2024

Don't forget to push - the commits are not on github yet ;)

Thanks for reminding me :) I just re-built all packages and commited them.

from schemastore-updater.

Related Issues (6)

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.