DEV: Fix several type issues with the api docs (#14016)

`nullable` is no longer a valid type, and types also can't be an empty
string, so just bringing a number of issues with types in compliance
with the openapi spec.
This commit is contained in:
Blake Erickson
2021-08-12 12:25:17 -06:00
committed by GitHub
parent 29bb79de37
commit 65f6d46045
10 changed files with 179 additions and 179 deletions

View File

@ -40,7 +40,7 @@ describe 'private messages' do
type: :object,
properties: {
can_create_topic: { type: :boolean },
draft: { type: :string, nullable: true },
draft: { type: [:string, :null] },
draft_key: { type: :string },
draft_sequence: { type: :integer },
per_page: { type: :integer },
@ -56,7 +56,7 @@ describe 'private messages' do
posts_count: { type: :integer },
reply_count: { type: :integer },
highest_post_number: { type: :integer },
image_url: { type: :string, nullable: true },
image_url: { type: [:string, :null] },
created_at: { type: :string },
last_posted_at: { type: :string },
bumped: { type: :boolean },
@ -66,7 +66,7 @@ describe 'private messages' do
last_read_post_number: { type: :integer },
unread_posts: { type: :integer },
pinned: { type: :boolean },
unpinned: { type: :string, nullable: true },
unpinned: { type: [:string, :null] },
visible: { type: :boolean },
closed: { type: :boolean },
archived: { type: :boolean },
@ -77,9 +77,9 @@ describe 'private messages' do
like_count: { type: :integer },
has_summary: { type: :boolean },
last_poster_username: { type: :string },
category_id: { type: :string, nullable: true },
category_id: { type: [:string, :null] },
pinned_globally: { type: :boolean },
featured_link: { type: :string, nullable: true },
featured_link: { type: [:string, :null] },
allowed_user_count: { type: :integer },
posters: {
type: :array,
@ -89,7 +89,7 @@ describe 'private messages' do
extras: { type: :string },
description: { type: :string },
user_id: { type: :integer },
primary_group_id: { type: :string, nullable: true },
primary_group_id: { type: [:string, :null] },
}
},
},
@ -99,9 +99,9 @@ describe 'private messages' do
type: :object,
properties: {
extras: { type: :string },
description: { type: :string, nullable: true },
description: { type: [:string, :null] },
user_id: { type: :integer },
primary_group_id: { type: :string, nullable: true },
primary_group_id: { type: [:string, :null] },
}
},
},
@ -135,7 +135,7 @@ describe 'private messages' do
properties: {
id: { type: :integer },
username: { type: :string },
name: { type: :string, nullable: true },
name: { type: [:string, :null] },
avatar_template: { type: :string },
}
},
@ -149,7 +149,7 @@ describe 'private messages' do
type: :object,
properties: {
can_create_topic: { type: :boolean },
draft: { type: :string, nullable: true },
draft: { type: [:string, :null] },
draft_key: { type: :string },
draft_sequence: { type: :integer },
per_page: { type: :integer },
@ -165,7 +165,7 @@ describe 'private messages' do
posts_count: { type: :integer },
reply_count: { type: :integer },
highest_post_number: { type: :integer },
image_url: { type: :string, nullable: true },
image_url: { type: [:string, :null] },
created_at: { type: :string },
last_posted_at: { type: :string },
bumped: { type: :boolean },
@ -175,7 +175,7 @@ describe 'private messages' do
last_read_post_number: { type: :integer },
unread_posts: { type: :integer },
pinned: { type: :boolean },
unpinned: { type: :string, nullable: true },
unpinned: { type: [:string, :null] },
visible: { type: :boolean },
closed: { type: :boolean },
archived: { type: :boolean },
@ -186,9 +186,9 @@ describe 'private messages' do
like_count: { type: :integer },
has_summary: { type: :boolean },
last_poster_username: { type: :string },
category_id: { type: :string, nullable: true },
category_id: { type: [:string, :null] },
pinned_globally: { type: :boolean },
featured_link: { type: :string, nullable: true },
featured_link: { type: [:string, :null] },
allowed_user_count: { type: :integer },
posters: {
type: :array,
@ -198,7 +198,7 @@ describe 'private messages' do
extras: { type: :string },
description: { type: :string },
user_id: { type: :integer },
primary_group_id: { type: :string, nullable: true },
primary_group_id: { type: [:string, :null] },
}
},
},