Swagger не отображает свойства объекта в пользовательском интерфейсе - PullRequest
0 голосов
/ 18 сентября 2018

Я делаю документацию для API.
На данный момент у меня есть:

/script/update:
post:
  tags: 
  - "Script"
  summary: Update a script
  operationId: updateScript
  responses:
    '200':
      description: OK
    "404":
      description: Not Found
  requestBody:
    description: A script object in order to make the request
    required: true
    content:
      application/x-www-form-urlencoded:
        schema:
          type: object
          properties:
            subsite_id:
              type: string
            script:
              type: object
              properties:
                script:
                  $ref: '#/components/schemas/ScriptType'
                type:
                  type: string
                  enum:
                    - custom
                    - interface
                    - freshbot
                    - feeder
                    - getter
                    - smcf
                status:
                  $ref: '#/components/schemas/ScriptStatus'
                comment:
                  type: string
                  format: string
                reason:
                  type: string
                  format: string

Проблема возникает, когда я пытаюсь использовать пользовательский интерфейс.Единственное, что появляется, это следующее: enter image description here Я хочу, чтобы объект сценария можно было заполнять поле за полем для каждого из свойств, таких как subsite_id.Что мне не хватает.

...