-
-
Notifications
You must be signed in to change notification settings - Fork 535
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
Discussion: How to handle $ref with additional properties #531
Comments
I think the ForceDirectReferences name is quite a good name. |
I dont like ForceDirectReferences because it implies that $ref is always used but this is not true. This would still be generated:
maybe AllowReferencesWithAdditionalProperties? |
Ok, but won't we mistake AdditionalProperties with the other AdditionalProperties term? |
true... AllowReferencesWithProperties? :-) |
Perfect |
Release v9.9.5 => Releasing: https://ci.appveyor.com/project/rsuter/njsonschema |
It works great. Thanks |
NJS (in NSwag) currently generates $refs as allOf if other properties are in the object:
Most tools expect the schema to be
but this is invalid:
See https://swagger.io/docs/specification/using-ref/
Discussions:
Code in question:
https://github.com/RSuter/NJsonSchema/blob/master/src/NJsonSchema/Generation/JsonSchemaGenerator.cs#L253-L274
Solutions:
true
because most tools expect only $refs and cannot handle oneOf/allOf refsThe text was updated successfully, but these errors were encountered: