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

Removing schema reference in response #428

Open
aleksicmarija opened this issue Apr 30, 2024 · 2 comments
Open

Removing schema reference in response #428

aleksicmarija opened this issue Apr 30, 2024 · 2 comments
Labels
question Further information is requested

Comments

@aleksicmarija
Copy link

Is it possible to configure removing this from response?
"$schema":"http://localhost:8000/api/v1/schemas/SomeSchema.json"

@danielgtaylor
Copy link
Owner

@aleksicmarija yes, you can stop using the SchemaLinkTransformer that is present in the default config. See here:

https://github.com/danielgtaylor/huma/blob/main/defaults.go#L53

You can either define your own config yourself, or use the default but reset the create hooks to prevent the link transformer from running.

@danielgtaylor danielgtaylor added the question Further information is requested label Apr 30, 2024
@aleksicmarija
Copy link
Author

@aleksicmarija yes, you can stop using the SchemaLinkTransformer that is present in the default config. See here:

https://github.com/danielgtaylor/huma/blob/main/defaults.go#L53

You can either define your own config yourself, or use the default but reset the create hooks to prevent the link transformer from running.

Thanks!

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

No branches or pull requests

2 participants