Code Monkey home page Code Monkey logo

Comments (4)

quangkhoa avatar quangkhoa commented on June 25, 2024

Hi @leagerl1, would you be able to provide your OpenAPI spec file?

from open-api-renderer.

leagerl1 avatar leagerl1 commented on June 25, 2024

Here is a sample spec that works with swagger-ui but not with Lincoln

openapi: 3.0.0
servers:
  - url: https://api{environment}.myapi.com/v1/management
    description: Sandbox environment for testing and developing configurations
    variables:
      environment:
        enum:
          - -sandbox
          - -staging
        default: ''
info:
  description: >-
    API for managing profile information
  version: 1.0.0
  title: Profile Management
tags:
  - name: User
    description: >-
      Actions for clients authorized by the user to create and update data on
      the user's behalf.
paths:
  /user:
    post:
      tags:
        - User
      summary: Add a new additional data user
      description: >-
        Action for registering new user accounts
      operationId: addUser
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - user_auth:
            - 'write:all'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/User'
        description: User to be registered with the RAD
        required: true
  /locations:
    get:
      tags:
        - Location
      summary: Retrieve Location records
      description: Retrieve all location records belonging to the authenticated user
      operationId: getUserLocations
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Location'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - user_auth:
            - 'read:all'
    post:
      tags:
        - Location
      summary: Create a new Location record
      description: >-
        Create a new record of location information including address,
        floorplan, and emergency contact info for the authenticated user
      operationId: addUserLocation
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Location'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - user_auth:
            - 'write:all'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Location'
        description: Personal info of the user to add
        required: true
  '/locations/{locationId}':
    parameters:
      - in: path
        name: locationId
        required: true
        description: Unique ID of the Location record to modify
        schema:
          type: integer
    delete:
      tags:
        - Location
      summary: Delete Location record
      description: Delete a full Location record belonging to the authenticated user
      operationId: deleteUserLocation
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Location'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - user_auth:
            - 'write:all'
    get:
      tags:
        - Location
      summary: Retrieve Location record
      description: >-
        Retrieve a full existing Location record for the authenticated user by
        ID
      operationId: getUserLocation
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Location'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - user_auth:
            - 'read:all'
    patch:
      tags:
        - Location
      summary: Partially update an existing Location record
      description: >-
        Update only specific attributes of the Location record with a partial
        update
      operationId: partialUpdateUserLocation
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Location'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - user_auth:
            - 'write:all'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Location'
        description: Location attributes to update
        required: true
    put:
      tags:
        - Location
      summary: Full update of an existing Location record
      description: >-
        Completely overwrite an existing Location record with the provided
        attributes
      operationId: updateUserLocation
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Location'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - user_auth:
            - 'write:all'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Location'
        description: Location record attributes to overwrite existing record with
        required: true
components:
  securitySchemes:
    emergency_auth:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: 'https://api-sandbox.myapi.com/oauth/token'
          scopes: {}
    user_auth:
      type: oauth2
      flows:
        password:
          tokenUrl: 'https://api-sandbox.myapi.com/oauth/token'
          scopes: {}
  schemas:
    Address:
      type: object
      properties:
        label:
          type: string
          description: 'Home, work, etc.'
        street_address:
          type: string
          description: Full street address
        locality:
          type: string
          description: 'City, town, etc.'
        region:
          type: string
          description: 'State, province, etc.'
        postal_code:
          type: string
          description: Short or long form
        country_code:
          type: string
          description: ISO ALPHA-2 country code
        latitude:
          type: number
          format: float
          description: 'EPSG:4326 ISO6709 latitude coordinate'
        longitude:
          type: number
          format: float
          description: 'EPSG:4326 ISO6709 longitude coordinate'
        note:
          type: string
          description: Free form descriptor
      required:
        - label
        - street_address
        - locality
        - region
        - postal_code
        - country_code
    Animal:
      type: object
      properties:
        label:
          type: string
          description: 'Service animal, livestock, etc.'
        full_name:
          type: string
          description: Name of the animal
        species:
          type: string
          format: E.164
          description: Animal species
        photo:
          type: string
          format: Email
          description: URL to photo of the animal
        note:
          type: string
          description: Free form descriptor
      required:
        - label
        - full_name
        - species
    Email:
      type: object
      properties:
        label:
          type: string
          description: 'Personal, work, etc.'
        email_address:
          type: string
          format: Email
          description: Email address
        note:
          type: string
          description: Free form descriptor
      required:
        - label
        - email_address
    EmergencyContact:
      type: object
      properties:
        label:
          type: string
          description: Contact relationship
        full_name:
          type: string
          description: Full name of the emergency contact
        phone:
          type: string
          format: E.164
          description: E.164 formatted phone number
        email:
          type: string
          format: Email
          description: Email address
        note:
          type: string
          description: Free form descriptor
      required:
        - label
        - full_name
        - phone
    ErrorResponse:
      type: object
      properties:
        detail:
          type: string
      required:
        - detail
    Location:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        address:
          type: object
          properties:
            value:
              type: array
              items:
                $ref: '#/components/schemas/Address'
            type:
              type: string
              default: address
              readOnly: true
            display_name:
              type: string
              default: Address
              readOnly: true
        animal:
          type: object
          properties:
            value:
              type: array
              items:
                $ref: '#/components/schemas/Animal'
            type:
              type: string
              default: animal
              readOnly: true
            display_name:
              type: string
              default: Animals
              readOnly: true
        comment:
          type: object
          properties:
            value:
              type: array
              items:
                type: string
            type:
              type: string
              default: string
              readOnly: true
            display_name:
              type: string
              default: Comments
              readOnly: true
        external_data_portal:
          type: object
          properties:
            value:
              type: array
              items:
                $ref: '#/components/schemas/URL'
            type:
              type: string
              default: web-url
              readOnly: true
            display_name:
              type: string
              default: External Data Portal
              readOnly: true
        fixed_video_feed:
          type: object
          properties:
            value:
              type: array
              items:
                $ref: '#/components/schemas/VideoStream'
            type:
              type: string
              default: video-stream
              readOnly: true
            display_name:
              type: string
              default: Fixed Video Feed
              readOnly: true
        floorplan:
          type: object
          properties:
            value:
              type: array
              items:
                $ref: '#/components/schemas/URL'
            type:
              type: string
              default: image-url
              readOnly: true
            display_name:
              type: string
              default: Floorplans
              readOnly: true
        location_contact:
          type: object
          properties:
            value:
              type: array
              items:
                $ref: '#/components/schemas/EmergencyContact'
            type:
              type: string
              default: emergency-contact
              readOnly: true
            display_name:
              type: string
              default: Emergency Contacts
              readOnly: true
        location_name:
          type: object
          properties:
            value:
              type: array
              items:
                type: string
            type:
              type: string
              default: string
              readOnly: true
            display_name:
              type: string
              default: Name
              readOnly: true
        mobile_video_feed:
          type: object
          properties:
            value:
              type: array
              items:
                $ref: '#/components/schemas/VideoStream'
            type:
              type: string
              default: video-stream
              readOnly: true
            display_name:
              type: string
              default: Mobile Video Feed
              readOnly: true
        updated_time:
          type: integer
          description: >-
            Millisecond-precise UNIX timestamp of when the record was last
            updated
          readOnly: true
    PhoneNumber:
      type: object
      properties:
        label:
          type: string
          description: 'Home, work, etc.'
        number:
          type: string
          format: E.164
          description: E.164 formatted phone number
        note:
          type: string
          description: Free form descriptor
      required:
        - label
        - number
    RealtimeMetric:
      type: object
      properties:
        label:
          type: string
          description: Data feed source descriptor
        data_feed:
          type: string
          description: URL for retrieving real-time data
        protocol:
          type: string
          description: 'Protocol for requesting this data from the URL i.e. https, wss'
          enum:
            - http
            - https
            - ws
            - wss
        note:
          type: string
          description: Free form descriptor
      required:
        - label
        - data_feed
        - protocol
    URL:
      type: object
      properties:
        label:
          type: string
          description: 'Personal, work, etc.'
        url:
          type: string
          format: URL
          description: Full URL address
        note:
          type: string
          description: Free form descriptor
      required:
        - label
        - url
    User:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        username:
          type: string
        email:
          type: string
        password:
          type: string
        created:
          type: string
          readOnly: true
        modified:
          type: string
          readOnly: true
      required:
        - username
        - email
        - password
    VideoStream:
      type: object
      properties:
        label:
          type: string
          description: Video feed source descriptor
        url:
          type: string
          description: URL for accessing video stream
        format:
          type: string
          format: E.164
          description: Video format the stream is in i.e. mp4
        latitude:
          type: number
          format: float
          description: 'EPSG:4326 ISO6709 latitude coordinate'
        longitude:
          type: number
          format: float
          description: 'EPSG:4326 ISO6709 longitude coordinate'
        note:
          type: string
          description: Free form descriptor
      required:
        - label
        - url
        - format

from open-api-renderer.

quangkhoa avatar quangkhoa commented on June 25, 2024

Hi @leagerl1 sorry it took a while for me to jump on this one. I think I found the issue.

Can you pls try again at https://temando.github.io/open-api-renderer/demo/

from open-api-renderer.

leagerl1 avatar leagerl1 commented on June 25, 2024

@quangkhoa That seems to have fixed it! Thank you

from open-api-renderer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.