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

Array of integers detected as a String? #45

Open
jp-tosca opened this issue Feb 13, 2025 · 2 comments
Open

Array of integers detected as a String? #45

jp-tosca opened this issue Feb 13, 2025 · 2 comments

Comments

@jp-tosca
Copy link

I was validating my document with doctor and I am getting the following warning on the console:

"manifestStoredResourceId" : {
            "type" : "array",
            "description" : "The list of storage id for the manifests of the external tool",
            "example" : [ 1, 2, 3 ],
            "items" : {
              "type" : "integer",
              "format" : "int64"
            }
          }

`got string, want integer

Location: components.schemas['ExternalToolDTO'].properties['versions'].items.properties['manifestStoredResourceId'].example
Rule: oas3-valid-schema-example`

Is this a bug or I am doing something wrong on my side?

openapi.json

@LasneF
Copy link

LasneF commented Feb 24, 2025

@daveshanley looks quite strange , the doctor looks sick :( as same file going to vacum gives no Error

PS D:\OneDrive - Murex\Downloads> vacuum lint '.\openapi (2).json' --no-clip

version: 0.15.2 | compiled: Tue, 07 Jan 2025 15:30:04 UTC
🔗 https://quobix.com/vacuum | https://github.com/daveshanley/vacuum

INFO Linting file '.\openapi (2).json' against 48 rules: https://quobix.com/vacuum/rulesets/recommended

      Linting passed, A perfect score! well done!                                                                     

INFO To see full details of linting report, use the '-d' flag.

@jp-tosca , btw your files got few glinch leveraging redocly like

Example value must conform to the schema: 1 property must NOT have unevaluated properties imagesResourceId.

930 | "manifestStoredResourceId" : [ 3 ]
931 | } ],
932 | "imagesResourceId" : [ 4 ]
933 | } ]
934 | }

and

[3] openapi (2).json:668:19 at #/paths/1api1auth1login/post/responses/200/content/application1json/example/tokenType

Example value must conform to the schema: must NOT have unevaluated properties tokenType.

666 | "roles" : [ "ADMIN" ],
667 | "accessToken" : "eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJqcHRvc2NhIiwiaWF0IjoxNzM4MzQzMDcyLCJleHAiOjE3Mzg0Mjk0NzJ9.6phCugWMc5i...<16 chars>
668 | "tokenType" : "Bearer"
669 | }
670 | }

@daveshanley this rules could be interesting to have by default as a warning , or info

@daveshanley
Copy link
Member

This is a fixed bug in vacuum: daveshanley/vacuum#615

I have not yet updated the doctor, will do that today.

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

No branches or pull requests

3 participants