Skip to content
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

Independent generation of individual JSON Schema files #211

Open
spion opened this issue Feb 2, 2020 · 0 comments
Open

Independent generation of individual JSON Schema files #211

spion opened this issue Feb 2, 2020 · 0 comments
Labels

Comments

@spion
Copy link

spion commented Feb 2, 2020

Before I start, I just wanted to say I really love this project, especially its full integration with JSON Schema!

I was wondering how easy it would be to generate multiple files instead of one single file. Assuming I have multiple top-level OpenRPC descriptions, as well as multiple JSON Schema files referenced via $ref in e.g. the components section from the OpenRPC schemas, how difficult it would be to generate them in separate files and/or modules depending on target language and add the appropriate imports when external ones are referenced?

My goal is to get some autogenerated stub classes that contain decorators describing params and return types including the validation rules. Other types would ideally also be represented as "classterfaces" (microsoft/TypeScript#27519 (comment)) which would allow attaching extra validation metadata to them.

Not saying it would necessarily belong to this project, was just wondering what tools would you recommend that I use in order to achieve something like the above. From a quick glance, openrpc-schema-js looks like the right package to get started, but I'm not sure if the model preserves the original location of all the resolved schema references.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant