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

Re-enable Read API schema tests #11216

Merged
merged 42 commits into from Jan 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
58e151f
test: re-enable read API schema tests
julianlam Jan 25, 2023
4c5cc39
fix: add back schema changes for 179faa2270f2ad955dcc4a7b04755acce59e…
julianlam Jan 25, 2023
5fda2fe
fix: schema changes from 488f0978a4aa1ca1e4d2a1f2e8c7ef7a681f2f27
julianlam Jan 26, 2023
fd2ae28
fix: schema changes for f4cf482a874701ce80c0f306c49d8788cec66f87
julianlam Jan 26, 2023
d544f0d
fix: schema update for be6bbabd0e2551fbe9571dcf3ee40ad721764543
julianlam Jan 26, 2023
e86d74d
fix: schema changes for 69c96078ea78ee2c45885a90a6f6a59f9042a33c
julianlam Jan 26, 2023
8e0b88e
fix: schema changes for d1364c313021e48a879a818b24947e1457c062f7
julianlam Jan 26, 2023
67215b1
fix: schema changes for 84ff1152f7552dd866e25a90972d970b9861107e
julianlam Jan 26, 2023
82d620d
fix: schema changes for b860c2605c209e0650ef98f4c80d842ea23a51ce
julianlam Jan 26, 2023
79039eb
fix: schema changes for 23cb67a1126481848fac39aafd1e253441e76d7f
julianlam Jan 26, 2023
2d7401e
fix: schema changes for b916e42f400dac8aa51670b15e439f87f0eb8939
julianlam Jan 27, 2023
51ee3c0
fix: schema change for a9bbb586fcb3a1c61b5fb69052236e78cdf7d743
julianlam Jan 27, 2023
18014b8
fix: schema changes for 4b738c8cd36c936a1dbe2bb900c694bf6c5520ec
julianlam Jan 27, 2023
87e06d9
fix: schema changes for 58b5781cea9acb129e6604a82ab5a5bfc0d8394d
julianlam Jan 27, 2023
06dc76c
fix: schema changes for 794bf01b21709c4be06584d576d706b3d6342057
julianlam Jan 27, 2023
b0c9a8c
fix: schema changes for 80ea12c1c1963f5b39fb64841e4f3c8da3c87af2, e36…
julianlam Jan 27, 2023
7c7de0c
fix: composer-default object in config?
julianlam Jan 27, 2023
3f87ac0
fix: schema changes for 9acdc6808c070555352951c651921df181b10993 and …
julianlam Jan 27, 2023
663b83c
fix: schema changes for c0a52924f1f7ef8caeaacda67363ac269b56042c
julianlam Jan 27, 2023
5ff25e7
fix: schema change for aba420a3f3b774e949c2539c73f3dc0e1ae79a38, move…
julianlam Jan 27, 2023
592de15
fix: schema changes for 8c67031609da30d788561459f8bb76e9a69253de
julianlam Jan 27, 2023
2d3fc2d
fix: schema changes for 27e53b42f3ce48fa61d3754375715cd41ffe808d
julianlam Jan 27, 2023
e3b9bfe
fix: schema changes for 28359665187b0a3b9ec6226dca1234ebdbd725a5
julianlam Jan 27, 2023
f44a479
fix: breaking test for email confirmation API call
julianlam Jan 27, 2023
d397f0b
fix: schema changes for refactored search page
julianlam Jan 27, 2023
45869b6
fix: schema changes for user object
julianlam Jan 27, 2023
1838520
fix: schema changes for 9f531f957e08eabb4bae844ddd67bde14d9b59f0
julianlam Jan 27, 2023
4ac83bc
fix: schema changes for c4042c70decd628e5b880bd109515b47e4e16164 and …
julianlam Jan 27, 2023
61eb232
fix: schema changes for 9b3616b10392e247974eb0c1e6225a1582bf6c69
julianlam Jan 27, 2023
c06ed71
fix: schema changes for 5afd5de07d42fd33f039a6f85ded3b4992200e5a
julianlam Jan 27, 2023
9358c2a
fix: schema change for 1d7baf12171cffbd3af8914bef4e6297d1160d49
julianlam Jan 27, 2023
48d306d
fix: schema changes for 57bfb37c55a839662144e684875003ab52315ecc and …
julianlam Jan 27, 2023
814c614
fix: schema changes for 6e86b4afa20d662af8b9f1c07518df2d8c258105 and …
julianlam Jan 27, 2023
6943c98
fix: allowing optional qs prop in pagination keys (not sure why this …
julianlam Jan 30, 2023
8a8bf14
fix: re-login on email change
julianlam Jan 30, 2023
ba3a95d
fix: schema changes for c926358d734a2fa410de87f4e4a91744215fc14a
julianlam Jan 30, 2023
3b27fd8
fix: schema changes for 388a8270c9882892bad5c8141f65da8d59eac0fd
julianlam Jan 30, 2023
9e01913
fix: schema change for 2658bcc821c22e137a6eeb9bb74098856a642eaf
julianlam Jan 30, 2023
411e00c
fix: no need to call account middlewares for chats routes
julianlam Jan 30, 2023
a47d9c5
fix: schema changes for 71743affc3e58dc85d4ffa15ce043d4d9ddd3d67
julianlam Jan 30, 2023
0bd0884
fix: final schema changes
julianlam Jan 30, 2023
f70d9c7
test: support for anyOf and oneOf
julianlam Jan 30, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions public/openapi/components/schemas/CommonProps.yaml
Expand Up @@ -65,6 +65,10 @@ CommonProps:
type: string
as:
type: string
crossorigin:
type: string
enum: ['', 'anonymous', 'use-credentials']
description: https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/crossorigin
required:
- rel
- href
Expand Down
5 changes: 5 additions & 0 deletions public/openapi/components/schemas/FlagObject.yaml
Expand Up @@ -165,8 +165,13 @@ FlagNotesObject:
type: string
description: An URL-safe variant of the username (i.e. lower-cased, spaces
removed, etc.)
displayname:
type: string
description: This is either username or fullname depending on forum and user settings
example: Dragon Fruit
picture:
type: string
nullable: true
uid:
type: number
description: A user identifier
Expand Down
23 changes: 23 additions & 0 deletions public/openapi/components/schemas/NotificationFilters.yaml
@@ -0,0 +1,23 @@
FiltersObject:
type: object
properties:
name:
type: string
filter:
type: string
selected:
type: boolean
count:
type: number
required:
- name
- filter
FiltersArray:
type: array
items:
anyOf:
- $ref: '#/FiltersObject'
- type: object
properties:
separator:
type: boolean
129 changes: 71 additions & 58 deletions public/openapi/components/schemas/Pagination.yaml
@@ -1,64 +1,77 @@
PaginationProps:
allOf:
- type: object
description: Optional properties that may or may not be present (except for `page`, which is always present, and is only here as a hack to pass validation)
properties:
page:
type: number
qs:
type: string
required:
- cid
Pagination:
type: object
properties:
pagination:
type: object
properties:
prev:
type: object
properties:
page:
type: number
active:
type: boolean
next:
type: object
allOf:
- $ref: '#/PaginationProps'
- type: object
properties:
page:
prev:
type: object
properties:
page:
type: number
active:
type: boolean
next:
type: object
properties:
page:
type: number
active:
type: boolean
first:
type: object
properties:
page:
type: number
active:
type: boolean
last:
type: object
properties:
page:
type: number
active:
type: boolean
rel:
type: array
description: A collection of objects used to build the link tags pointing to adjacent pages, if any.
items:
type: object
properties:
rel:
type: string
enum: [prev, next]
href:
type: string
description: A query string that points to the previous or next page
pages:
type: array
items:
type: object
properties:
page:
type: number
description: The current page
active:
type: boolean
description: If the page noted in this array is the current page
qs:
type: string
description: A query string that points to the page noted in this array
currentPage:
type: number
active:
type: boolean
first:
type: object
properties:
page:
type: number
active:
type: boolean
last:
type: object
properties:
page:
type: number
active:
type: boolean
rel:
type: array
description: A collection of objects used to build the link tags pointing to adjacent pages, if any.
items:
type: object
properties:
rel:
type: string
enum: [prev, next]
href:
type: string
description: A query string that points to the previous or next page
pages:
type: array
items:
type: object
properties:
page:
type: number
description: The current page
active:
type: boolean
description: If the page noted in this array is the current page
qs:
type: string
description: A query string that points to the page noted in this array
currentPage:
type: number
pageCount:
type: number
pageCount:
type: number
91 changes: 91 additions & 0 deletions public/openapi/components/schemas/UserObject.yaml
Expand Up @@ -133,6 +133,15 @@ UserObject:
example:
- administrators
- Staff
muted:
type: boolean
description: Whether or not the user has been muted.
mutedUntil:
type: number
description: A UNIX timestamp representing the moment a muted state will be lifted.
mutedReason:
type: string
description: The admin-provided reason for being muted.
'icon:text':
type: string
description: A single-letter representation of a username. This is used in the auto-generated icon given to users without an avatar
Expand Down Expand Up @@ -322,6 +331,17 @@ UserObjectFull:
example:
- administrators
- Staff
muted:
type: boolean
description: Whether or not the user has been muted.
mutedUntil:
type: number
description: A UNIX timestamp representing the moment a muted state will be lifted.
nullable: true
mutedReason:
type: string
description: The admin-provided reason for being muted.
nullable: true
'icon:text':
type: string
description: A single-letter representation of a username. This is used in the auto-generated icon given to users without an avatar
Expand All @@ -348,6 +368,8 @@ UserObjectFull:
type: string
age:
type: number
emailHidden:
type: boolean
emailClass:
type: string
ips:
Expand All @@ -361,6 +383,8 @@ UserObjectFull:
properties:
best:
type: number
controversial:
type: number
blocks:
type: number
bookmarks:
Expand Down Expand Up @@ -413,6 +437,8 @@ UserObjectFull:
type: boolean
canBan:
type: boolean
canMute:
type: boolean
canFlag:
type: boolean
canChangePassword:
Expand All @@ -425,10 +451,22 @@ UserObjectFull:
type: number
showHidden:
type: boolean
allowProfilePicture:
type: boolean
allowCoverPicture:
type: boolean
allowProfileImageUploads:
type: number
allowedProfileImageExtensions:
type: string
groups:
type: array
items:
$ref: ./GroupObject.yaml#/GroupFullObject
selectedGroup:
type: array
items:
$ref: ./GroupObject.yaml#/GroupFullObject
disableSignatures:
type: boolean
reputation:disabled:
Expand All @@ -444,6 +482,9 @@ UserObjectFull:
type: string
route:
type: string
url:
type: string
description: The relative path to the profile link route from the root of the forum
name:
type: string
visibility:
Expand Down Expand Up @@ -659,3 +700,53 @@ UserObjectACP:
nullable: true
ips:
type: array
BanMuteArray:
type: array
items:
type: object
properties:
uid:
type: number
timestamp:
type: number
expire:
type: number
fromUid:
type: number
user:
type: object
properties:
username:
type: string
description: A friendly name for a given user account
userslug:
type: string
description: An URL-safe variant of the username (i.e. lower-cased, spaces
removed, etc.)
picture:
type: string
uid:
type: number
description: A user identifier
icon:text:
type: string
description: A single-letter representation of a username. This is used in the
auto-generated icon given to users without
an avatar
icon:bgColor:
type: string
description: A six-character hexadecimal colour code assigned to the user. This
value is used in conjunction with
`icon:text` for the user's auto-generated
icon
example: "#f44336"
until:
type: number
untilReadable:
type: string
timestampReadable:
type: string
timestampISO:
type: string
reason:
type: string