mirror of
https://github.com/Redocly/redoc.git
synced 2025-01-31 10:04:08 +03:00
feat: support for x-discriminator-value for 2.0 as alternative to mapping (#534)
Add vendor extension `x-discriminator-value `used by swagger-codegen for Swagger 2.0 as an alternative to OpenAPI 3.0 mapping feature.
This commit is contained in:
parent
35f83e491a
commit
070dc5c0a8
|
@ -280,7 +280,7 @@ export class OpenAPIParser {
|
|||
def.allOf !== undefined &&
|
||||
def.allOf.find(obj => obj.$ref !== undefined && $refs.indexOf(obj.$ref) > -1)
|
||||
) {
|
||||
res['#/components/schemas/' + defName] = defName;
|
||||
res['#/components/schemas/' + defName] = def['x-discriminator-value'] || defName;
|
||||
}
|
||||
}
|
||||
return res;
|
||||
|
|
Loading…
Reference in New Issue
Block a user