The swagger on https://docs.discourse.org/openapi.json is not valid it seems.
Reproduction scenario:
- Go to https://editor.swagger.io/
- Click on File -> Import URL.
- Enter the URL.
After a few seconds, 142 validation errors occur.
Can not attach, but resembles:
Structural error at paths./categories.json.post.responses.200.content.application/json.schema.properties.category.properties.name.description
should be string
Jump to line 184
Structural error at paths./categories.json.post.responses.200.content.application/json.schema.properties.category.properties.color.description
should be string
Jump to line 187
Structural error at paths./categories.json.post.responses.200.content.application/json.schema.properties.category.properties.text_color.description
should be string
Jump to line 190
... more ...
Is there an alternative (validating) swagger definition available?
Suggested patch
The following is a suggested patch sofar.
Samenvatting
diff --git "a/discourse-swagger-original.json" "b/discourse-swagger.json"
index f9267f5d0..dcebe3fd8 100644
--- "a/discourse-swagger-original.json"
+++ "b/discourse-swagger.json"
@@ -578,8 +578,8 @@
},
"available_groups": {
"type": "array",
- "uniqueItems": null,
- "minItems": null,
+ "uniqueItems": false,
+ "minItems": 0,
"items": {
"type": "object"
}
@@ -1196,8 +1196,8 @@
},
"actions_summary": {
"type": "array",
- "uniqueItems": null,
- "minItems": null,
+ "uniqueItems": false,
+ "minItems": 0,
"items": {
"type": "object"
}
@@ -1788,8 +1788,8 @@
},
"actions_summary": {
"type": "array",
- "uniqueItems": null,
- "minItems": null,
+ "uniqueItems": false,
+ "minItems": 0,
"items": {
"type": "object"
}
@@ -1885,8 +1885,8 @@
},
"stream": {
"type": "array",
- "uniqueItems": null,
- "minItems": null,
+ "uniqueItems": false,
+ "minItems": 0,
"items": {
"type": "object"
}
@@ -1899,14 +1899,14 @@
},
"timeline_lookup": {
"type": "array",
- "uniqueItems": null,
- "minItems": null,
+ "uniqueItems": false,
+ "minItems": 0,
"items": {
"properties": {
"0": {
"type": "array",
"uniqueItems": true,
- "minItems": null,
+ "minItems": 0,
"items": {
"type": "object"
}
@@ -3621,8 +3621,8 @@
"properties": {
"user_badges": {
"type": "array",
- "uniqueItems": null,
- "minItems": null,
+ "uniqueItems": false,
+ "minItems": 0,
"items": {
"type": "object"
}
@@ -3798,8 +3798,8 @@
},
"featured_user_badge_ids": {
"type": "array",
- "uniqueItems": null,
- "minItems": null,
+ "uniqueItems": false,
+ "minItems": 0,
"items": {
"type": "object"
}
@@ -3864,8 +3864,8 @@
"properties": {
"user_badges": {
"type": "array",
- "uniqueItems": null,
- "minItems": null,
+ "uniqueItems": false,
+ "minItems": 0,
"items": {
"type": "object"
}
@@ -4041,8 +4041,8 @@
},
"featured_user_badge_ids": {
"type": "array",
- "uniqueItems": null,
- "minItems": null,
+ "uniqueItems": false,
+ "minItems": 0,
"items": {
"type": "object"
}
@@ -4734,8 +4734,8 @@
},
"posters": {
"type": "array",
- "uniqueItems": null,
- "minItems": null,
+ "uniqueItems": false,
+ "minItems": 0,
"items": {
"type": "object"
}
@@ -4745,16 +4745,16 @@
},
"users": {
"type": "array",
- "uniqueItems": null,
- "minItems": null,
+ "uniqueItems": false,
+ "minItems": 0,
"items": {
"type": "object"
}
},
"categories": {
"type": "array",
- "uniqueItems": null,
- "minItems": null,
+ "uniqueItems": false,
+ "minItems": 0,
"items": {
"type": "object"
}
@@ -4773,24 +4773,24 @@
},
"post_ids": {
"type": "array",
- "uniqueItems": null,
- "minItems": null,
+ "uniqueItems": false,
+ "minItems": 0,
"items": {
"type": "object"
}
},
"user_ids": {
"type": "array",
- "uniqueItems": null,
- "minItems": null,
+ "uniqueItems": false,
+ "minItems": 0,
"items": {
"type": "object"
}
},
"category_ids": {
"type": "array",
- "uniqueItems": null,
- "minItems": null,
+ "uniqueItems": false,
+ "minItems": 0,
"items": {
"type": "object"
}
@@ -6406,8 +6406,8 @@
},
"owners": {
"type": "array",
- "uniqueItems": null,
- "minItems": null,
+ "uniqueItems": false,
+ "minItems": 0,
"items": {
"type": "object"
}
@@ -7241,8 +7241,8 @@
},
"choices": {
"type": "array",
- "uniqueItems": null,
- "minItems": null,
+ "uniqueItems": false,
+ "minItems": 0,
"items": {
"type": "object"
}