'duplicated mapping key' error occurred, if set same paths with different method (OAS3)
See original GitHub issue‘duplicated mapping key’ error occurred, if set same paths with different method (OAS3)
Steps to reproduce the behavior:
- Docker Run swagger-ui with yaml file below
- Then See errors ‘duplicated mapping key’
Q&A
- OS: OSX High Sierra
- Browser: Safari
- Version: 13.1
- Method of installation: docker run
- Swagger-UI version: 3.18.3
- Swagger/OpenAPI version: OpenAPI 3.0
Example Swagger/OpenAPI definition:
openapi: 3.0.0
info:
description: bug test
version: "1.0"
title: sample
tags:
- name: user
description: user
paths:
/user:
post:
tags:
- user
summary: User Register
description: ""
operationId: UserPost
requestBody:
content:
application/json:
schema:
type: object
properties:
email:
type: string
password:
type: string
required: true
responses:
"200":
description: Success
content:
application/json:
schema:
type: object
properties:
status:
type: string
"400":
description: エラー
content:
application/json:
schema:
type: object
properties:
message:
type: string
/user:
delete:
tags:
- user
summary: User Deletion
description: ""
operationId: UserDelete
requestBody:
content:
application/json:
schema:
type: object
properties:
email:
type: string
required: true
responses:
"200":
description: Success
content:
application/json:
schema:
type: object
properties:
status:
type: string
"400":
description: エラー
content:
application/json:
schema:
type: object
properties:
message:
type: string
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Swagger Parser error duplicated mapping key - Stack Overflow
Hi friends, I have an error during yaml API testing in Swagger editor. I have duplicate mapping key error in line no 98 ......
Read more >How to use a same method name with different tags?
But its throwing compilation error in swagger editor saying that "duplicated mapping key". /get_property: post: tags: - Car /get_property: post: ...
Read more >Swagger giving Duplicate key class parameter error
When I erase the controller having same endpoints name, everything just works fine. So is there any way out of it without changing...
Read more >OpenAPI Specification - Version 3.0.3 - Swagger
This includes all fields that are used as keys in a map, except where explicitly noted ... Holds a set of reusable objects...
Read more >Step 4: The paths object (OpenAPI tutorial) | Documenting APIs
The paths object has several sub-objects: a path items object, ... POST, PUT, and DELETE methods we explored in the Endpoints section of...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is not a valid API definition.
Each path must be listed only once, and all HTTP methods applicable to that path must be listed under that path, as follows:
Thanks for this