Forum Discussion

axthosarouris's avatar
axthosarouris
New Contributor
6 years ago

OpenApi v. 3.0.1 specification is recognised as OpenApi v.2 specification

I am uploading a REST API specification to Swaggerhub through the Rest API of SwaggerHub. Although the specification is writter in accoring to OpenApi v.3.0.1, Swaggerhub opens it with the version 2 editor. When I open the file I get the message "Update Editor to OpenAPI 3.0?" How can I specify the Open API version of a file that I am sending through the REST APi of Swaggerhub, so that when I open the specification in SwaggerHub it opens with the correct editor?

 

Following the OpenApi Spec:

     openapi: 3.0.1
info:
  title: aut-reg-inf-autreg-58-openapi-lambdab-final
  version: "1.0"
servers:
  - url: 'https://serverUrl.com'
paths:
  /buildbranch:
    post:
      operationId: insertEntry
      responses:
        default:
          description: A textual response
          content:
            application/json:
              schema:
                type: object
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MODELde9675'
            example:
              repository: authority-registry
              branch: master
              owner: BIBSYSDEV
              action: create
        required: true
  /githubhook:
    post:
      operationId: githubhook
      responses:
        default:
          description: A textual response
          content:
            text/plain:
              schema:
                type: string
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: api-key
  schemas:
    MODELde9675:
      type: object
      properties:
        owner:
          type: string
          description: The owner
        action:
          type: string
          description: create or update
        repository:
          type: string
          description: The name of the repository
        branch:
          type: string
          description: The name of the branch
security:
  - ApiKeyAuth: []

2 Replies

  • amwins-fred's avatar
    amwins-fred
    Occasional Visitor

    I am experiencing the same issue. Is there an update as to when this might be fixed?

  • Hello,

     

    Thank you for taking the time to send this post. This has been logged as an issue and we will address this in the coming SwaggerHub releases.

     

    Thks,

    Laura Kennedy

    Product Owner

    SwaggerHub