At Springwolf we use the parsed schemas to generate Examples. Thereby we use the field Schema.getName() for all schemas including enums.
When enumAsRef is used, the name of the enum is missing in its class schema. Also, when serialized, the name of a schema is ignored because of the @JsonIgnore annotation.
At Springwolf we use the parsed schemas to generate Examples. Thereby we use the field
Schema.getName()
for all schemas including enums.When enumAsRef is used, the name of the enum is missing in its class schema. Also, when serialized, the name of a schema is ignored because of the
@JsonIgnore
annotation.This PR adds the schema name for enums. We found the following comment: https://github.com/swagger-api/swagger-core/blob/5ee9cefe9455bf07d2671d9fd93fce2bd7c7b94f/modules/swagger-core/src/main/java/io/swagger/v3/core/jackson/ModelResolver.java#L379 And therefore believe that all enum classes should appear as models, resulting in the adaption of the tests.
Relates to #4722