My code in Swagger ui editor has Errors Parser error duplicated mapping key

33 views Asked by At

I've read the docs numerous times but I can't get rid of the error. Id's are supposed to be able to be passed as parameters to the routes but the error doesn't let this happen. What can be done to make it function as it should and allow id's to be passed the routes where it's needed? The error I get is Errors Parser error duplicated mapping key.

openapi: 3.0.0
info:
  title: CAR-RENTAL
  description: ''
  contact:
    name: Bronwyn
    url: ''
    email: [email protected]
  version: '1.0'
servers:
- url: https://brainy-clothes-fish.cyclic.app/api/v1
  variables: {}
paths:
  /auth/register:
    post:
      tags:
      - Auth
      summary: Register User
      operationId: RegisterUser
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
              - $ref: '#/components/schemas/RegisterUserRequest'
              - example:
                  email: [email protected]
                  password: secret
            example:
              email: [email protected]
              password: secret
        required: true
      responses:
        '200':
          description: ''
          headers: {}
      deprecated: false
      security: []
  /auth/login:
    post:
      tags:
      - Auth
      summary: Login User
      operationId: LoginUser
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
              - $ref: '#/components/schemas/LoginUserRequest'
              - example:
                  email: [email protected]
                  password: secret
            example:
              email: [email protected]
              password: secret
        required: true
      responses:
        '200':
          description: ''
          headers: {}
      deprecated: false
      security: []
  /vehicles:
    get:
      tags:
      - Vehicles
      summary: Get All Vehicles
      operationId: GetAllVehicles
      parameters: []
      responses:
        '200':
          description: ''
          headers: {}
      deprecated: false
      security: []
    post:
      tags:
      - Vehicles
      summary: Add Vehicle
      operationId: AddVehicle
      parameters: []
      requestBody:
        content:
          multipart/form-data:
            encoding: {}
            schema:
              required:
              - pictures
              - name
              - transmission
              - colour
              - description
              - seat
              - price
              - type
              type: object
              properties:
                pictures:
                  type: string
                  format: binary
                name:
                  type: string
                  example: fine carh
                transmission:
                  type: string
                  example: Manual
                colour:
                  type: string
                  example: uhhf
                description:
                  type: string
                  example: jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj sssssssssssssssssssssssssssss aaaaaaaaaaaaaaaaaaaaaa wwwwwwwwwwwwwwwwwwwww
                seat:
                  type: integer
                  format: int32
                  example: 4
                price:
                  type: integer
                  format: int32
                  example: 278
                type:
                  type: string
                  example: Suv
        required: false
      responses:
        '200':
          description: ''
          headers: {}
      deprecated: false
    patch:
      tags:
      - Vehicles
      summary: Update Vehicle
      operationId: UpdateVehicle
      parameters: []
      requestBody:
        content:
          multipart/form-data:
            encoding: {}
            schema:
              required:
              - pictures
              - description
              - colour
              - transmission
              - seat
              - price
              - name
              - type
              type: object
              properties:
                pictures:
                  type: string
                  format: binary
                description:
                  type: string
                  example: good bcbcnc dnddddddddddddddddddddddddddb fjfjjjjjjjjjjjjjjjjjjjjv shhdhdhhdhdh eiiririririri fffffffffffffffffffffffffffff
                colour:
                  type: string
                  example: blue
                transmission:
                  type: string
                  example: Manual
                seat:
                  type: integer
                  format: int32
                  example: 2
                price:
                  type: integer
                  format: int32
                  example: 40
                name:
                  type: string
                  example: aak
                type:
                  type: string
                  example: Suv
        required: false
      responses:
        '200':
          description: ''
          headers: {}
      deprecated: false
      /vehicles/{id}:
    get:
      parameters:
        - in: path
          name: id   # Note the name is the same as in the path
          required: true
          schema:
            type: string
            minimum: 1
          description: The vehicle ID
    delete:
      tags:
      - Vehicles
      summary: Delete Vehicle
      operationId: DeleteVehicle
      parameters: []
      responses:
        '200':
          description: ''
          headers: {}
      deprecated: false
      /vehicles/{id}:
    get:
      parameters:
        - in: path
          name: id   # Note the name is the same as in the path
          required: true
          schema:
            type: string
            minimum: 1
          description: The vehicle ID
  /profile:
    post:
      tags:
      - Profile
      summary: Create Profile
      operationId: CreateProfile
      parameters: []
      requestBody:
        content:
          multipart/form-data:
            encoding: {}
            schema:
              type: object
              properties:
                picture:
                  type: string
                  format: binary
                description:
                  type: string
                  example: link check
                name:
                  type: string
        required: false
      responses:
        '200':
          description: ''
          headers: {}
      deprecated: false
    patch:
      tags:
      - Profile
      summary: Update Profile
      operationId: UpdateProfile
      parameters: []
      requestBody:
        content:
          multipart/form-data:
            encoding: {}
            schema:
              required:
              - picture
              - name
              type: object
              properties:
                picture:
                  type: string
                  format: binary
                name:
                  type: string
                  example: usid
        required: false
      responses:
        '200':
          description: ''
          headers: {}
      deprecated: false
      /profile/{id}:
    get:
      parameters:
        - in: path
          name: id   # Note the name is the same as in the path
          required: true
          schema:
            type: string
            minimum: 1
          description: The string ID
    get:
      tags:
      - Profile
      summary: Get Single Profile
      operationId: GetSingleProfile
      parameters: []
      responses:
        '200':
          description: ''
          headers: {}
      deprecated: false
      get:
      parameters:
        - in: path
          name: id   # Note the name is the same as in the path
          required: true
          schema:
            type: string
            minimum: 1
          description: The string ID
  /auth/logout:
    post:
      tags:
      - Profile
      summary: Logout Profile
      operationId: LogoutProfile
      parameters: []
      responses:
        '200':
          description: ''
          headers: {}
      deprecated: false
  /search:
    get:
      tags:
      - Search
      summary: Search
      operationId: Search
      parameters:
      - name: name
        in: header
        description: ''
        required: true
        style: simple
        schema:
          type: string
          example: newest
      responses:
        '200':
          description: ''
          headers: {}
      deprecated: false
      security: []
components:
  schemas:
    RegisterUserRequest:
      title: RegisterUserRequest
      required:
      - email
      - password
      type: object
      properties:
        email:
          type: string
        password:
          type: string
      example:
        email: [email protected]
        password: secret
    LoginUserRequest:
      title: LoginUserRequest
      required:
      - email
      - password
      type: object
      properties:
        email:
          type: string
        password:
          type: string
      example:
        email: [email protected]
        password: secret
  securitySchemes:
    httpBearer:
      type: http
      scheme: bearer
security:
- httpBearer: []
tags:
- name: Misc
  description: ''
- name: Auth
  description: ''
- name: Vehicles
  description: ''
- name: Profile
  description: ''
- name: Search
  description: ''
0

There are 0 answers