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: Parameter Object must contain one the following fields: content, schema apilint(5150001) #3791

Closed
congjunhua opened this issue Jan 28, 2023 · 3 comments

Comments

@congjunhua
Copy link

Q&A

  • OS: [macOS]
  • Browser: [chrome]
  • Version: [109.0.5414.87]
  • Method of installation: [web]
  • Swagger-Editor version: [next]
  • Swagger/OpenAPI version: [Swagger 2.0, OpenAPI 3.0]

Content & configuration

Example Swagger/OpenAPI definition:

paths:
  /todos:
    get: 
      tags: 
        - todos
      summary: 查询
      parameters: 
        - $ref: '#/components/parameters/offset'

components: 
  parameters: 
    offset:
      name: offset
      in: query
      description: 跳过的数据数
      schema: 
        type: integer
        format: int64
        minimum: 1

Describe the bug you're encountering

Parameter Object must contain one the following fields: content, schemaapilint(5150001)

Screenshots

image

@char0n char0n changed the title Parameter Object must contain one the following fields: content, schema apilint(5150001) SwaggerEditor@next: Parameter Object must contain one the following fields: content, schema apilint(5150001) Feb 9, 2023
@char0n char0n self-assigned this Feb 9, 2023
@char0n
Copy link
Member

char0n commented Feb 9, 2023

Hi @congjunhua,

Thanks for the report. I can succesfully reproduce the issue on OpenAPI 3.1.0 definition. OpenAPI 3.0.x definitions are not affected. Bugfix is on the way...

char0n added a commit to swagger-api/apidom that referenced this issue Feb 9, 2023
Before the fix, Reference Object referencing Parameter Objects
generated 5150001 error, which was a false positive.

Refs swagger-api/swagger-editor#3791
@char0n
Copy link
Member

char0n commented Feb 9, 2023

Fix provided upstream in ApiDOM: swagger-api/apidom#2545

char0n added a commit to swagger-api/apidom that referenced this issue Feb 9, 2023
Before the fix, Reference Object referencing Parameter Objects
generated 5150001 error, which was a false positive.

Refs swagger-api/swagger-editor#3791
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)
@char0n
Copy link
Member

char0n commented Feb 16, 2023

@char0n char0n closed this as completed Feb 16, 2023
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