Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dropwizard paths conflict with manually supplied paths #339

Open
blast-hardcheese opened this issue Jul 9, 2019 · 0 comments

Comments

Projects
None yet
1 participant
@blast-hardcheese
Copy link
Collaborator

commented Jul 9, 2019

Given the following spec, with an already registered /Blix in a manually created resource, the route deduplication logic that comes from applying this patch changes the resource's path handler from @Path("/v1/Foo/{foo}/Bar/{bar}") to @Path("v1"), which causes some of the paths to start yielding 405 Method Not Allowed with no way to call those paths anymore.

 openapi: 3.0.1
 info:
   version: 1.0.0
   title: ExampleServer
   license:
     name: None
 
 servers:
   - url: http://127.0.0.1:1234/v1
 
 paths:
   /Foo/{foo}/Bar/{bar}/Baz/{baz}:
     parameters:
       - $ref: "#/components/parameters/fooPathParam"
       - $ref: "#/components/parameters/barPathParam"
       - $ref: "#/components/parameters/versionPathParam"
     get:
       operationId: getBazForBar
       x-jvm-package: foobarbaz
       responses:
         '200':
           description: OK
           content:
             application/json:
               schema:
                 $ref: "#/components/schemas/Blix"
         '400':
           $ref: "#/components/responses/BadRequest"
         '404':
           $ref: "#/components/responses/NotFound"
         '500':
           $ref: "#/components/responses/InternalServerError"
+
+  /Blix:
+    get:
+      operationId: getBlixList
+      x-jvm-package: foobarbaz
+      responses:
+        '200':
+          description: OK
+          content:
+            application/json:
+              schema:
+                $ref: "#/components/schemas/BlixList"
+        '400':
+          $ref: '#/components/responses/BadRequest'
+        '500':
+          $ref: "#/components/responses/InternalServerError"
 components:
   parameters:
     fooPathParam:
       in: path
       name: foo
       required: true
       schema:
         type: string
     barPathParam:
       in: path
       name: bar
       required: true
       schema:
         type: string
     bazPathParam:
       in: path
       name: baz
       required: true
       schema:
         type: integer
         format: int32
 
   responses:
     BadRequest:
       description: Bad Request
       content:
         application/json:
           schema:
             $ref: "#/components/schemas/ErrorResponse"
     NotFound:
       description: Not Found
       content:
         application/json:
           schema:
             $ref: "#/components/schemas/ErrorResponse"
     InternalServerError:
       description: Internal Server Error
       content:
         application/json:
           schema:
             $ref: "#/components/schemas/ErrorResponse"
 
   schemas:
     Foo:
       type: string
 
     ErrorResponse:
       type: object
       required:
         - code
         - message
       properties:
         message:
           type: string
         code:
           type: integer
           format: int32
 
     BlixList:
       type: object
       required:
         - results
         - meta
       properties:
         results:
           type: array
           items:
             $ref: "#/components/schemas/Blix"
 
     Blix:
       type: object
       required:
         - foo
       properties:
         foo:
           $ref: "#/components/schemas/Foo"
         friendly_name:
           type: string
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.