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

Approach for renaming definition names #1865

Open
jefersondaniel opened this issue Feb 5, 2024 · 1 comment
Open

Approach for renaming definition names #1865

jefersondaniel opened this issue Feb 5, 2024 · 1 comment

Comments

@jefersondaniel
Copy link

Hi, I have a use case where I'm referencing types from another services libraries. However multiple services may define the same name so they would conflict. So, my objective is to have a way to "rename" those types on the generated json schema in a way that avoid name conflicts.

What would be the recommended approach here?

I managed to get this working forking this library and adding this code: 77511b0

However I would like to know if there is a better approach here.

@domoritz
Copy link
Member

domoritz commented Feb 5, 2024

Proper support for renaming would be nice. Right now, I use perl and regexes which is definitely not ideal but has worked reliably for some time: https://github.com/vega/vega-lite/blob/5e835cade0caa6df8ed681dc45d90acacfc32ea7/scripts/rename-schema.sh/

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

No branches or pull requests

2 participants