question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

get path extension from swagger 2

See original GitHub issue

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

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
gracekarinacommented, Sep 24, 2020

We are looking into it!

1reaction
klokanecommented, Sep 24, 2020

@gracekarina sure, you are right. I wrong copy example, sorry

Read more comments on GitHub >

github_iconTop Results From Across the Web

Paths and Operations - Swagger
Swagger defines a unique operation as a combination of a path and an HTTP method. This means that two GET or two POST...
Read more >
openapi documentation how to handle extension in the path
the swagger specification calls for: path:/return/{pid} .... ... It is a jersey+spring mvc application - so both the URLs are hitting the same ......
Read more >
Swagger 2.X Getting started · swagger-api/swagger-core Wiki
Examples and server integrations for generating the Swagger API ... "application/xml"}) public class PetResource { @GET @Path("/{petId}") public Pet ...
Read more >
Swagger vendor extensions - Apiary Help
Swagger does not support adding a summary and description to Path Item Objects. To provide this functionality, we will use the x-summary and...
Read more >
Using OpenAPI and Swagger UI - Quarkus
The solution is located in the openapi-swaggerui-quickstart directory. ... The Quarkus smallrye-openapi extension comes with a swagger-ui extension ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found