mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-07 19:22:14 +09:00
feat: add announcement channels, publishing and following (#3090)
This commit is contained in:
@@ -17,9 +17,13 @@ describe('OpenAPI generation from API controllers', () => {
|
||||
content: {'application/json': {schema: {$ref: '#/components/schemas/ChannelUpdateRequestBody'}}},
|
||||
});
|
||||
const options = document.components.schemas.ChannelUpdateRequestBody.anyOf;
|
||||
expect(options).toHaveLength(5);
|
||||
expect(options).toHaveLength(6);
|
||||
const withType = (options ?? []).filter((option) => option.properties && 'type' in option.properties);
|
||||
expect(withType).toHaveLength(2);
|
||||
for (const option of withType) {
|
||||
expect(option.properties?.type).toMatchObject({anyOf: [{const: 0}, {const: 5}]});
|
||||
}
|
||||
for (const option of options ?? []) {
|
||||
expect(option.properties).not.toHaveProperty('type');
|
||||
expect(option.required).toBeUndefined();
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user