-
Notifications
You must be signed in to change notification settings - Fork 146
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
Schema export consistency #335
Comments
In e3e5171 (#353), I removed the @Makeshift |
@A-312 did you hear about json-schema drafts? If there will be a way to generate schemas in that format, some can utilize json-schema-to-typescript package and get typescript definitions for free! |
The last week, I take 4-5 hours to work on that to thintk if should implement json-schema or not. I choose to:
|
@Makeshift I saw in netwok, you always pushed the same commit It seems to me:
|
If that's the case, I'll take a look when I have a moment and close the issue if solved. Thanks! |
Before I open a pull request for this, I was curious if there was a design reason for it.
I've noticed that the schema that is exported with
getSchema
andgetSchemaString
are not the same as the schema that was originally supplied to Convict. In particular, two transformations happen:a.b.c
work without having to deal with walking through a nested object)In my fork I've commented out the line that makes the format name lowercase, and introduced an unflattening function that is applied to
getSchema
andgetSchemaString
to obtain an output consistent with the schema you put in. I also outputproperties
instead.I was just wondering if there was a reason behind these design decisions before I opened a pull request to change them (although that would require a major version bump).
The text was updated successfully, but these errors were encountered: