mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-02 19:05:55 +02:00
fix(backend): correct invalid schema format specifying only required for anyOf (#16089)
* fix(backend): correct invalid schema format specifying only `required` for `anyOf` * refactor(backend): make types derived from `allOf` or `anyOf` more strong
This commit is contained in:
@@ -89,7 +89,8 @@ export function genOpenapiSpec(config: Config, includeSelfRef = false) {
|
||||
schema.required = undefined;
|
||||
}
|
||||
|
||||
const hasBody = (schema.type === 'object' && schema.properties && Object.keys(schema.properties).length >= 1);
|
||||
const hasBody = (schema.type === 'object' && schema.properties && Object.keys(schema.properties).length >= 1)
|
||||
|| ['allOf', 'oneOf', 'anyOf'].some(o => (Array.isArray(schema[o]) && schema[o].length >= 0));
|
||||
|
||||
const info = {
|
||||
operationId: endpoint.name.replaceAll('/', '___'), // NOTE: スラッシュは使えない
|
||||
|
||||
Reference in New Issue
Block a user