Описание Swagger и внешние аннотации документации не работают в readme.io - PullRequest
0 голосов
/ 23 сентября 2019

Я сгенерировал файл OAS Swagger в исходном коде Java.Я загрузил этот файл в editor.swagger.io, и он отображает все описанные параметры и методы, а также заголовок страницы.enter image description here

Однако, когда я загружаю этот же файл Swagger в readme.io, описания параметров и методов, а также заголовок страницы не отображаются.

enter image description here

Почему это?

Вот файл чванства ...

openapi: 3.0.1
info:
  title: Groundlist API DocumentationB
  description: This is documentation for the Groundlist API. You can find out more
    about Groundlist at Groundlist.org.
  termsOfService: http://groundlist.org/terms/
  contact:
    email: gideon@dieselpoint.com
  license:
    name: Apache2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  version: "1.0"
servers:
- url: https://app.groundlist.org/api
tags:
- name: Widget
  description: Operations about widget
- name: Contact
  description: Operations about contacts
  externalDocs:
    description: More details about the contacts service
    url: http://google.com
paths:
  /contact/{list_id}/{contact_id}:
    get:
      tags:
      - Contact
      summary: Get contact
      description: Returns contact with given ID
      operationId: getContact
      parameters:
      - name: list_id
        in: path
        description: The ID of the list to which the contact belongs
        required: true
        schema:
          type: integer
          format: int32
      - name: contact_id
        in: path
        description: The ID of the contact to fetch
        required: true
        schema:
          type: integer
          format: int32
      responses:
        default:
          description: The contact object
          content:
            application/json:
              schema:
                type: string
        400:
          description: Contact not found
    post:
      tags:
      - Contact
      summary: Update contact
      description: Updates a contact with given contact_id in the list with given
        list_id
      operationId: updateContact
      parameters:
      - name: list_id
        in: path
        description: ID of list to which you'd like to add the contact
        required: true
        schema:
          type: integer
          format: int32
      - name: contact_id
        in: path
        description: ID of contact you'd like to update
        required: true
        schema:
          type: integer
          format: int32
      requestBody:
        content:
          application/json:
            schema:
              type: object
              additionalProperties:
                type: object
        required: true
      responses:
        default:
          description: default response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Message'
    delete:
      tags:
      - Contact
      summary: Delete contact
      description: deletes contact with given contact_id from list with given list_id
      operationId: deleteContact
      parameters:
      - name: list_id
        in: path
        description: ID of list to which you'd like to add the contact
        required: true
        schema:
          type: integer
          format: int32
      - name: contact_id
        in: path
        description: ID of contact you'd like to update
        required: true
        schema:
          type: integer
          format: int32
      responses:
        default:
          description: default response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Message'
  /contact/{list_id}:
    post:
      tags:
      - Contact
      summary: Create contact
      description: Adds a new contact to a list
      operationId: createContact
      parameters:
      - name: list_id
        in: path
        description: ID of list to which you'd like to add the contact
        required: true
        schema:
          type: integer
          format: int32
      requestBody:
        description: Contact object to create
        content:
          application/json:
            schema:
              type: string
        required: true
      responses:
        default:
          description: default response
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: object
  /widget/{name}:
    get:
      tags:
      - Widget
      summary: Get widget
      description: This is an example description for the getWidget() method
      operationId: getWidget
      parameters:
      - name: name
        in: path
        description: 'The name of the widget to fetch '
        required: true
        schema:
          type: string
      responses:
        default:
          description: The test widget
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WidgetObject'
        400:
          description: Test object not found
  /widget/create:
    post:
      tags:
      - Widget
      summary: Create a widget object
      description: This is a description for the createWidget() method
      operationId: createWidget
      requestBody:
        description: Widget object to create
        content:
          '*/*':
            schema:
              $ref: '#/components/schemas/WidgetObject'
        required: true
      responses:
        default:
          description: default response
          content:
            '*/*':
              schema:
                type: string
components:
  schemas:
    Message:
      type: object
      properties:
        success:
          type: boolean
        message:
          type: string
        statusCode:
          type: integer
          format: int32
        reasonPhrase:
          type: string
    WidgetObject:
      type: object
      properties:
        testNumber:
          type: integer
          format: int32
        testString:
          type: string

Приветствия.-Gideon

...