Skip to content
This repository has been archived by the owner on Nov 11, 2023. It is now read-only.

Upgrading from v9 to v11 no longer allows parameter components to be used in DELETE requests #259

Closed
ChristianIvicevic opened this issue Apr 6, 2020 · 1 comment
Assignees

Comments

@ChristianIvicevic
Copy link

ChristianIvicevic commented Apr 6, 2020

Describe the bug
With a parameter defined in components.paramters the code generator no longer finds it for DELETE requests when referencing them after upgrading from v9 to v11. (Surprisingly enough only DELETE fails apparently)

To Reproduce

  1. Create a test.yaml file:
openapi: 3.0.2
info:
  title: Backend
  description: Description
  version: 2.0.0-SNAPSHOT
paths:
  /api/v2/library/connectors/{connectorName}:
    put:
      summary: Summmary
      operationId: putLibraryConnector
      parameters:
        - $ref: '#/components/parameters/connectorName'
      responses:
        200:
          description: Ok
    delete:
      summary: Summmary
      operationId: deleteLibraryConnector
      parameters:
        - $ref: '#/components/parameters/connectorName'
      responses:
        204:
          description: No content
components:
  parameters:
    connectorName:
      name: connectorName
      in: path
      description: Name of a connector to query
      required: true
      schema:
        type: string
      example: rc_mehrfachoffer_cme_mapper
  examples: {}
  schemas: {}
  1. Run restful-react import --file ./test.yaml --output generated.tsx

Expected behavior
No errors.

Screenshots
Error: The path params connectorName can't be found in parameters (deleteLibraryConnector)

Desktop (please complete the following information):

  • OS: macOS 10.15.3
  • Library: v11 (working with ^9.12.1)
@fabien0102
Copy link
Contributor

Thanks for the repro steps, sorry for the delay, but the fix is finally coming 😁 (it was because we didn't resolved the parameters ref) in the schema.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants