-
Notifications
You must be signed in to change notification settings - Fork 282
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
What is registerSchemaByURI used for? #462
Comments
No. This is for referencing other schema documents from your schema. Ie. if you register a schema with an URI like If you want to validate different objects against different schemas, then you have to build separate |
Thank you @erosb ! Can you anser this (#456 (comment)) concern of mine, please? |
So this $ref is static in another file, or I can dynamically point to it in the app? |
Can you please elaborate on your usecase? What do you want to achieve? |
I just wanted to make sure if I correctly understand what is registerSchemaByURI used for. I wanted to make prototype bean of schemas in SpringBoot application to be able to extract it to common library and based on properties create schemas. But at the same time if the application needs to use more than 1 schema at the same time I would need separate bean for the other needed schemas. |
I suggest creating your own SchemaFactory class and instantiate it as a
singleton bean. Its client beans can use the factory to create schemas as
per your application needs.
…On Mon, Jul 25, 2022, 10:06 DominikSarnowski ***@***.***> wrote:
I just wanted to make sure if I correctly understand what is
registerSchemaByURI used for.
I wanted to make prototype bean of schemas in SpringBoot application to be
able to extract it to common library and based on properties create
schemas. But at the same time if the application needs to use more than 1
schema at the same time I would need separate bean for the other needed
schemas.
—
Reply to this email directly, view it on GitHub
<#462 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACCWBQWFWNXW6L27CBYHC3VVZDHLANCNFSM54HBIE3A>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hello.
Can I use it to register different schemas to validate different objects?
If yes, how to load those different schemas at runtime?
Or is it only to combine schemas that relates one to another?
Can you clarify it to me, please?
The text was updated successfully, but these errors were encountered: