Skip to content

[Bug] Unable to generate workflow from OpenAPI file with reusable request parametersΒ #18

@chalu

Description

@chalu

I don't know if this is related to #4 , but I had just discovered StepCI and was trying it out to generate a workflow file from my OpenAPI 3.0 spec and I encountered errors from the stepci CLI

Error: TypeError: Cannot read properties of undefined (reading 'default')
Caused By: trying to access default in param.schema.default around line 75 of plugin-openapi/index.js

This is as a result of having reusable parameters in my API spec like below πŸ‘‡πŸ½

/characters:
    get:
      ...
      parameters:
        - $ref: '#/components/parameters/JobTypeQueryParam'
        - $ref: '#/components/parameters/SortOnQueryParam'
        - $ref: '#/components/parameters/SortDirQueryParam'
        - $ref: '#/components/parameters/PageQueryParam'
        - $ref: '#/components/parameters/CharacterNameQueryParam'
     ...

components:
  parameters:
    ...
    PageQueryParam:
      in: query
      name: page
      description: For a paginated response, the page of the matching data to fetch. Defaults to `1`
      required: false
      schema:
        type: integer
        minimum: 1
        maximum: 100
        default: 1
        example: 2

Is this being looked into, seeing that issue #4 is dating back to October 2022?

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions