Forum Discussion

jamesfloyd's avatar
jamesfloyd
New Contributor
17 days ago

Need help with Path and URL Template errors

The errors i am experiencing are below.  The yaml follows.  Asking for ideas as to how can correct these errors.  I new to SwaggerHub and these i have been unable to resolve.

49  should only have path names that start with `/`

81  Path parameter "cashDrawerNbr" must have the corresponding {cashDrawerNbr} segment in the "post" path

86  Path parameter "transactionSeq" must have the corresponding {transactionSeq} segment in the "post" path

92  Path parameter "userName" must have the corresponding {userName} segment in the "post" path

98  Path parameter "businessDate" must have the corresponding {businessDate} segment in the "post" path

openapi: 3.0.0
info:
  description: Console Shared Info
  version: "1.0.0"
  title: Console API
  contact:
    email: jamesf@nowhere.com
  license:
    name: Technologies
    url: 'https://nowhere.com/'

tags:
  - name: deposit
    description:  functionality
    
servers:
  - description: Swagger API Auto mocking
    url: "{protocol}://{server}.dynamite.com:{port}/{version}"
    variables: 
      protocol:
        enum:
          - 'wss'
          - 'ws'
          - 'http'
          - 'https'
        default: 'wss'
      server:
        enum:
          - 'production'
          - 'test'
          - 'dev'
          - 'uat'
        default: 'dev'
      port:
        enum:
          - '8080'
          - '8090'
          - '443'
          - '8443'
        default: '8090'
      version:
        enum:
          - 'v1'
          - 'v2'
          - 'v3'
          - 'v4'    # update this list as needed when new versions are built
        default: 'v1'

paths:
    get:
      tags:
        - deposit response
      summary: deposit transaction send request/receive response
      operationId: depositTransaction
      description: |
        By passing in the appropriate data fields, you can process a deposit transaction
      responses:
        '200':
          description: deposit transaction successfully processed by Dynamite
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/depositTransaction'
        '400':
          description: bad input parameter
  
    post:
     '/deposit/v1/{cashDrawerNbr}/{transactionSeq}/{userName}/{businessDate}':
    
      tags:
        - deposit request
      summary: deposit transaction request
      operationId: deposit transaction
      description: send deposit transaction for TCR
      produces:
        - application/json
      parameters:
        - in: path
          name: cashDrawerNbr
          description: Cash Drawer number of Teller application transaction
          required: true
          type: string
        - in: path
          name: transactionSeq
          description: Transaction sequence number of Teller application transaction 
          required: true
          schema:
            type: string
        - in: path
          name:  userName
          description:  User name from the Teller application
          required: true
          schema:
            type: string
        - in: path
          name:  businessDate
          description:  Business date of Teller application transaction
          required: true
          schema:
            type: string
      responses:
        '201': 
          description: deposit submitted
        '400':
          description: 'invalid input, object invalid'
        '409':
          description: duplicate transaction request
components:
  schemas:
    depositTransaction:
      type: object
      required:
        - cashDrawerNbr
        - transactionSeq
        - userName
        - businessDate
      properties:
        id:
          type: string
          format: uuid
          example: d290f1ee-6c54-4b01-90e6-d701748f0851
        name:
          type: string
          example: Widget Adapter
        releaseDate:
          type: string
          format: date-time
          example: '2016-08-29T09:12:33.001Z'
        manufacturer:
          $ref: '#/components/schemas/depositTransaction'

No RepliesBe the first to reply