swagger-api / swagger-api/swagger-parser
get path extension from swagger 2
Open
Nobody has claimed this yet.
Bug
- Dominant language
- Java
- Stars
- 867
- Forks
- 560
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 7
Description
Hi,
is there way how can i get extension form 'paths' level (while parse swagger 2)?
According to spec https://swagger.io/specification/v2/#pathsObject paths can contain
/{path}-> PathItemObject^x--> Any
eg:
swagger: "2.0"
info:
title: api name
version: 1.0.0
paths:
x-my-extension:
type: HTTP_BACKEND
url: https://example.com/mock
/alerts/KS:
get:
description: description if operation
responses:
'200':
description: Successful Response
schema:
type: object
Swagger.getPaths() returns Map<String, Path>, but i did not find way how to access extension.
Tried on 1.0.51
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing Swagger.getPaths() and the Swagger 2 paths representation used by the parser. Check how the sample x-my-extension entry is handled during parsing; the work is done when extensions at the paths level can be accessed without losing regular path entries.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100