-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
Labels
Description
I am trying to use this feature and I am having doubt understanding correctly what it does.
I expect the following snippet to be rendered with a drop-down having names "cash" and "paypal" (from the enum) instead of the definition's key "CashPayment", "PayPalPayment".
I get the following result though, on a fresh bower install of the 1.10.2 (which is the same I would get using simply 'discriminator'):
I am misunderstanding the feature or is there a bug?
swagger: "2.0"
info:
description: ReDoc
title: title
version: "2.0.0"
host: github.com
basePath: "/"
paths:
"/payment":
post:
summary: Create
parameters:
- name: body
in: body
schema:
$ref: "#/definitions/Payment"
responses:
201:
schema:
$ref: "#/definitions/Payment"
definitions:
Payment:
x-extendedDiscriminator: type
type: object
required:
- type
properties:
type:
type: string
name:
type: string
CashPayment:
allOf:
- $ref: "#/definitions/Payment"
- properties:
type:
type: string
enum:
- cash
currency:
type: string
PayPalPayment:
allOf:
- $ref: "#/definitions/Payment"
- properties:
type:
type: string
enum:
- paypal
userEmail:
type: stringThanks.
Reactions are currently unavailable
