-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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: false positive in linting JSON Schema #4026
Comments
Thanks for reporting this. I'm transferring this issue under swagger-editor repo. |
I have the same issue |
I have the same issue too. |
Same issue with anyOf, allOf, and oneOf |
Underlying issue is swagger-api/apidom#2481 JSON Schemas needs to be consolidated within the apidom-ls package. |
Same here.
From the example https://swagger.io/docs/specification/data-models/oneof-anyof-allof-not/#anyof |
Any updates on this? this is stopping me from using the api-dom validator github action, because my definition is right, but the workflow just throws those "errors"... "responses": {
"200": {
"description": "Ok",
"content": {
"application/json": {
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/CursorPaginationBase"
},
{
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ProductResource"
}
}
},
"type": "object"
}
]
}
}
}
}, |
It looks like the main issue is with |
This makes problem in generator as well. If there is an error such as this, For example, in some model, among other stuff, I have:
Generator will ignore that |
@goors, if by |
fixed by swagger-api/apidom#2987 |
Is this really fixed? I've tested on https://editor-next.swagger.io/ the example usage of the openapi: "3.0.0"
info:
title: Simple API overview
version: 2.0.0
paths:
/pets:
patch:
requestBody:
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/Cat'
- $ref: '#/components/schemas/Dog'
responses:
'200':
description: Updated
components:
schemas:
Dog:
type: object
properties:
bark:
type: boolean
breed:
type: string
enum: [Dingo, Husky, Retriever, Shepherd]
Cat:
type: object
properties:
hunts:
type: boolean
age:
type: integer |
@Brunnn It's been fixed but haven't been released and deployed yet. ETA for release/deploy today/tommorow. |
@Brunnn are you able to use api-dom validator github action now? |
Yes, its working perfect now! Thanks @char0n. |
Q&A (please complete the following information)
Content & configuration
Example Swagger/OpenAPI definition:
Swagger-UI configuration options:
None
Describe the bug you're encountering
The editor shows an error on line 23 saying, "oneOf must be a non-empty array of schemas" but it is an array of schemas.
To reproduce...
Steps to reproduce the behavior:
Expected behavior
No errors or warnings.
Screenshots
The text was updated successfully, but these errors were encountered: