Geben Sie ein array als parameter mit Swagger
Wie kann ich angeben, wird ein array als parameter? Zum Beispiel, post /Personen gegeben werden kann, strings username, firstname und lastname, und array myArray.
paths:
/persons:
post:
parameters:
- name: person_what_is_the_purpose_of_this
in: body
description: The person to create.
schema:
required:
- username
properties:
firstName:
type: string
lastName:
type: string
username:
type: string
myArray:
type: array
items:
properties:
myArrayElement:
type: string
responses:
200:
description: A list of Person
schema:
type: array
items:
required:
- username
properties:
firstName:
type: string
lastName:
type: string
username:
type: string
InformationsquelleAutor user1032531 | 2016-09-20
Du musst angemeldet sein, um einen Kommentar abzugeben.
InformationsquelleAutor user1032531