Skip to content

A platform for community discussion. Free, open, simple.

Fix structural problems with the openapi spec (#22256)

Kyle9515bb5adde7
diff --git a/spec/requests/api/schemas/json/category_create_request.json b/spec/requests/api/schemas/json/category_create_request.json
index 471f34bd518..f71b292dc12 100644
--- a/spec/requests/api/schemas/json/category_create_request.json
+++ b/spec/requests/api/schemas/json/category_create_request.json
@@ -42,7 +42,7 @@
},
"form_template_ids": {
"type": "array",
- "items": []
+ "items": {}
}
},
"required": [
diff --git a/spec/requests/api/schemas/json/category_create_response.json b/spec/requests/api/schemas/json/category_create_response.json
index a669e84aa74..bc2da289014 100644
--- a/spec/requests/api/schemas/json/category_create_response.json
+++ b/spec/requests/api/schemas/json/category_create_response.json
@@ -76,7 +76,7 @@
},
"form_template_ids": {
"type": "array",
- "items": []
+ "items": {}
},
"has_children": {
"type": [
diff --git a/spec/requests/api/schemas/json/category_update_response.json b/spec/requests/api/schemas/json/category_update_response.json
index 93cf445d60d..9ed80aa85fd 100644
--- a/spec/requests/api/schemas/json/category_update_response.json
+++ b/spec/requests/api/schemas/json/category_update_response.json
@@ -79,7 +79,7 @@
},
"form_template_ids": {
"type": "array",
- "items": []
+ "items": {}
},
"has_children": {
"type": [
diff --git a/spec/requests/api/schemas/json/post_show_response.json b/spec/requests/api/schemas/json/post_show_response.json
index 2010d8f6519..fa6f32bc495 100644
--- a/spec/requests/api/schemas/json/post_show_response.json
+++ b/spec/requests/api/schemas/json/post_show_response.json
@@ -126,33 +126,31 @@
},
"actions_summary": {
"type": "array",
- "items": [
- {
- "type": "object",
- "additionalProperties": false,
- "properties": {
- "id": {
- "type": "integer",
- "description": "`2`: like, `3`, `4`, `6`, `7`, `8`: flag"
- },
- "count": {
- "type": "integer"
- },
- "acted": {
- "type": "boolean"
- },
- "can_undo": {
- "type": "boolean"
- },
- "can_act": {
- "type": "boolean"
- }
+ "items": {
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "id": {
+ "type": "integer",
+ "description": "`2`: like, `3`, `4`, `6`, `7`, `8`: flag"
},
- "required": [
- "id"
- ]
- }
- ]
+ "count": {
+ "type": "integer"
+ },
+ "acted": {
+ "type": "boolean"
+ },
+ "can_undo": {
+ "type": "boolean"
+ },
+ "can_act": {
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "id"
+ ]
+ }
},
"moderator": {
"type": "boolean"
@@ -207,9 +205,7 @@
},
"mentioned_users": {
"type": "array",
- "items": [
-
- ]
+ "items": {}
},
"name": {
"type": [
diff --git a/spec/requests/api/schemas/json/post_update_response.json b/spec/requests/api/schemas/json/post_update_response.json
index 87ca79819d9..56a710290c7 100644
--- a/spec/requests/api/schemas/json/post_update_response.json
+++ b/spec/requests/api/schemas/json/post_update_response.json
@@ -130,24 +130,22 @@
},
"actions_summary": {
"type": "array",
- "items": [
- {
- "type": "object",
- "additionalProperties": false,
- "properties": {
- "id": {
- "type": "integer"
- },
- "can_act": {
- "type": "boolean"
- }
+ "items": {
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "id": {
+ "type": "integer"
},
- "required": [
- "id",
- "can_act"
- ]
- }
- ]
+ "can_act": {
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "id",
+ "can_act"
+ ]
+ }
},
"moderator": {
"type": "boolean"
@@ -205,9 +203,7 @@
},
"mentioned_users": {
"type": "array",
- "items": [
-
- ]
+ "items": {}
},
"name": {
"type": [
diff --git a/spec/requests/api/schemas/json/site_response.json b/spec/requests/api/schemas/json/site_response.json
index 99cabace440..1d3c4cb0c6d 100644
--- a/spec/requests/api/schemas/json/site_response.json
+++ b/spec/requests/api/schemas/json/site_response.json
@@ -712,7 +712,7 @@
},
"form_template_ids": {
"type": "array",
- "items": []
+ "items": {}
}
},
"required": [