ePages-de / restdocs-raml

Adds RAML support for Spring REST Docs
MIT License
26 stars 7 forks source link

Improve handling of JsonFieldType.VARIES #16

Open mduesterhoeft opened 6 years ago

mduesterhoeft commented 6 years ago

If spring-rest-docs finds a field in a list with multiple types (e.g. once null, once string) it sets the type to JsonFieldType.VARIES - Currently we use a NullSchema in such a case - which is not ideal. It would be better to collect all the types and write a json schema with multiple types - see https://github.com/everit-org/json-schema/blob/master/core/src/main/java/org/everit/json/schema/CombinedSchema.java