OpenAPI 3? as "https://swagger.io/docs/specification/data-models/enums/" told.
在 2017年8月18日星期五 UTC+8上午3:20:39,Ron写道: > > Which version of the API definition do you use? > > > > > > > > *From: *<[email protected] <javascript:>> on behalf of 李聪 < > [email protected] <javascript:>> > *Reply-To: *"[email protected] <javascript:>" < > [email protected] <javascript:>> > *Date: *Wednesday, August 16, 2017 at 23:33 > *To: *Swagger <[email protected] <javascript:>> > *Subject: *Try enums and got some Errors, are the docs deprecated? > > > > I read the doc "https://swagger.io/docs/specification/enums/" and try at > once on "http://editor.swagger.io/", but got some errors ??? > > > > yaml from doc: > > > > paths: > > /products: > > get: > > parameters: > > - in: query > > name: color > > required: true > > schema: > > $ref: '#/components/schemas/Color' > > responses: > > '200': > > description: OK > > components: > > schemas: > > Color: > > type: string > > enum: > > - black > > - white > > - red > > - green > > - blue > > > > Errors > > > > > > > Schema error at paths['/products'].get.parameters[0].in > > > > should be equal to one of the allowed values allowedValues: body, header, > formData, path > > > > > > Jump to line 5 > > > > > > > > > Schema error at paths['/products'].get.parameters[0] > > > > should NOT have additional properties additionalProperty: schema, in, > name, required > > > > > > Jump to line 5 > > > > > > -- > You received this message because you are subscribed to the Google Groups > "Swagger" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] <javascript:>. > For more options, visit https://groups.google.com/d/optout. > > -- You received this message because you are subscribed to the Google Groups "Swagger" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
