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

SwaggerEditor@next - Reference for Parameters Failing #3760

Closed
ForbiddenEra opened this issue Jan 13, 2023 · 3 comments
Closed

SwaggerEditor@next - Reference for Parameters Failing #3760

ForbiddenEra opened this issue Jan 13, 2023 · 3 comments

Comments

@ForbiddenEra
Copy link

Q&A (please complete the following information)

  • OS: Win10
  • Browser: Firefox
  • Version: 108.0.1
  • Method of installation: editor-next.swagger.io
  • Swagger-Editor version: whatever version is online there currently
  • Swagger/OpenAPI version: OpenAPI 3.0.0 -> 3.0.3

Content & configuration

yaml is from example at https://swagger.io/docs/specification/describing-parameters/

openapi: 3.0.3

components:
  parameters:
    offsetParam:  # <-- Arbitrary name for the definition that will be used to refer to it.
                  # Not necessarily the same as the parameter name.
      in: query
      name: offset
      required: false
      schema:
        type: integer
        minimum: 0
      description: The number of items to skip before starting to collect the result set.
    limitParam:
      in: query
      name: limit
      required: false
      schema:
        type: integer
        minimum: 1
        maximum: 50
        default: 20
      description: The numbers of items to return.
paths:
  /users:
    get:
      summary: Gets a list of users.
      parameters:
        - $ref: '#/components/parameters/offsetParam'
        - $ref: '#/components/parameters/limitParam'
      responses:
        '200':
          description: OK
  /teams:
    get:
      summary: Gets a list of teams.
      parameters:
        - $ref: '#/components/parameters/offsetParam'
        - $ref: '#/components/parameters/limitParam'
      responses:
        '200':
          description: OK

Describe the bug you're encountering

I get Parameter Object must contain one of the following fields: content, schema - setting the definition version to swagger: '2.0' or using the non-next version of the editor causes zero error.

To reproduce...

Steps to reproduce the behavior:

  1. Go to https://editor-next.swagger.io
  2. Paste yaml from above / documentation example
  3. See error

Expected behavior

No error. Again, this doesn't happen on editor-next when using swagger: '2.0' or on the previous version of the editor even when using openapi: 3.0.3

@char0n
Copy link
Member

char0n commented Feb 9, 2023

Hi @ForbiddenEra,

Closing as duplicate of #3791 where fix have already been provided, and issue will be remedied completely after the next release.

@char0n char0n closed this as completed Feb 9, 2023
@char0n char0n self-assigned this Feb 9, 2023
char0n added a commit that referenced this issue Feb 16, 2023
Linting was producing false positives when
Parameter Object was referenced via
Reference Object. Fix was provided by ApiDOM@0.67.1.

This commit also contain updates to number
of development dependencies.

Refs #3760
Refs #3791
Refs #3770
Refs https://github.com/swagger-api/apidom/releases/tag/v0.67.1
Closes #3846
Closes #3844
Closes #3843
char0n added a commit that referenced this issue Feb 16, 2023
Linting was producing false positives when
Parameter Object was referenced via
Reference Object. Fix was provided by ApiDOM@0.67.1.

This commit also contain updates to number
of development dependencies.

Refs #3760
Refs #3791
Refs #3770
Refs https://github.com/swagger-api/apidom/releases/tag/v0.67.1
Closes #3846
Closes #3844
Closes #3843
swagger-bot pushed a commit that referenced this issue Feb 16, 2023
# [5.0.0-alpha.47](v5.0.0-alpha.46...v5.0.0-alpha.47) (2023-02-16)

### Bug Fixes

* fix OpenAPI  3.x.y Parameter Object linting ([#3855](#3855)) ([e6c8dea](e6c8dea)), closes [#3760](#3760) [#3791](#3791) [#3770](#3770) [#3846](#3846) [#3844](#3844) [#3843](#3843)
@ForbiddenEra
Copy link
Author

Hi @ForbiddenEra,

Closing as duplicate of #3791 where fix have already been provided, and issue will be remedied completely after the next release.

Thanks; I was going to say I didn't see the duplicate issue but as I was typing that I noticed 3791 > 3760, so I guess I was first and perhaps not a total duping failure on my part ;)

@char0n
Copy link
Member

char0n commented Mar 20, 2023

I was first and perhaps not a total duping failure on my part ;)

@ForbiddenEra not at all, duplicates as normal part of SDLC. THanks for reporting this.

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

No branches or pull requests

2 participants