Created by: jmini
Reported by @FatCash on https://github.com/swagger-api/swagger-codegen/issues/8001
OAS2 example:
definitions:
SomeObj:
type: object
properties:
nick:
$ref: "#/definitions/NickName"
NickName:
type: string
minLength: 1
maxLength: 3
pattern: "^[A-Z]+$"
The solution proposed here is really temporary. When we will work on #20, I think that a lot of the methods in DefaultCodegen
will be refactored. For example the OpenAPI instance will be propagated everywhere instead of Map<String, Schema>
. This way we can use ModelUtils
to resolve referenced Schema consistently.