Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Allow passing of "id" during the schema generation #132

Open
sghosh-discovery opened this issue Nov 18, 2022 · 1 comment
Open

Allow passing of "id" during the schema generation #132

sghosh-discovery opened this issue Nov 18, 2022 · 1 comment
Assignees
Labels
awaiting_feedback Waiting for the reporter to respond enhancement

Comments

@sghosh-discovery
Copy link

Hi,

It appears that we can't pass an "id" field. This is useful for JSON schema versioning. We should be able to pass a remote ID.

Thanks.

@chrusty
Copy link
Owner

chrusty commented Dec 15, 2022

Hi @sghosh-discovery, thank you for getting in touch. Just so I can understand, are you talking about filling in some value for the $id property (as described here)?

This is something I can have a look at. Where would you suggest that we source this property from? I've had issues with this property before, as depending on what you're using these schemas with they may want to actually resolve references in here. I've certainly seen this break certain validators in the past, so we'd need to be careful how this is implemented (probably controlled by an option or flag, off by default).

Some suggestions:

  • The name of the generated json file
  • Some name derived from the source proto file and message/enum

Please let me know what you were thinking and we'll see what we can come up with. Thanks for your interest in the project!

@chrusty chrusty self-assigned this Dec 15, 2022
@chrusty chrusty added enhancement awaiting_feedback Waiting for the reporter to respond labels Dec 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
awaiting_feedback Waiting for the reporter to respond enhancement
Projects
None yet
Development

No branches or pull requests

2 participants