feat(openapi): merging openapi-test branch into master
parent
ba6d3fd372
commit
8387178b25
@ -0,0 +1,75 @@
|
||||
GroupObject:
|
||||
type: object
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
description: The group name
|
||||
slug:
|
||||
type: string
|
||||
description: URL-safe slug of the group name
|
||||
createtime:
|
||||
type: number
|
||||
description: UNIX timestamp of the group's creation
|
||||
userTitle:
|
||||
type: number
|
||||
description: Label text for the user badge
|
||||
userTitleEnabled:
|
||||
type: boolean
|
||||
description:
|
||||
type: string
|
||||
description: The group description
|
||||
memberCount:
|
||||
type: number
|
||||
hidden:
|
||||
type: number
|
||||
system:
|
||||
type: number
|
||||
private:
|
||||
type: number
|
||||
disableJoinRequests:
|
||||
type: number
|
||||
disableLeave:
|
||||
type: number
|
||||
nameEncoded:
|
||||
type: string
|
||||
displayName:
|
||||
type: string
|
||||
description: A custom override of the group's name, a friendly name
|
||||
labelColor:
|
||||
type: string
|
||||
description: A six-character hexadecimal colour code
|
||||
textColor:
|
||||
type: string
|
||||
description: A six-character hexadecimal colour code
|
||||
icon:
|
||||
type: string
|
||||
description: A FontAwesome icon string
|
||||
createtimeISO:
|
||||
type: string
|
||||
description: "`createtime` rendered as an ISO 8601 format"
|
||||
cover:thumb:url:
|
||||
type: string
|
||||
cover:url:
|
||||
type: string
|
||||
cover:position:
|
||||
type: string
|
||||
descriptionParsed:
|
||||
type: string
|
||||
members:
|
||||
type: array
|
||||
items:
|
||||
$ref: UserObject.yaml#/UserObjectSlim
|
||||
membersNextStart:
|
||||
type: number
|
||||
pending:
|
||||
type: array
|
||||
invited:
|
||||
type: array
|
||||
isMember:
|
||||
type: boolean
|
||||
isPending:
|
||||
type: boolean
|
||||
isInvited:
|
||||
type: boolean
|
||||
isOwner:
|
||||
type: boolean
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,22 @@
|
||||
'use strict';
|
||||
|
||||
const assert = require('assert');
|
||||
const path = require('path');
|
||||
const SwaggerParser = require('@apidevtools/swagger-parser');
|
||||
|
||||
describe('Read API', () => {
|
||||
let readApi;
|
||||
|
||||
it('should pass OpenAPI v3 validation', async () => {
|
||||
const apiPath = path.resolve(__dirname, '../public/openapi/read.yaml');
|
||||
try {
|
||||
readApi = await SwaggerParser.validate(apiPath);
|
||||
} catch (e) {
|
||||
assert.ifError(e);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
describe('Write API', () => {
|
||||
let writeApi;
|
||||
});
|
Loading…
Reference in New Issue