persona-community-5/.pnpm-store/v3/files/29/e9be6da64ef1a1b9a1825316547d501ae43d6f56b5be4d414063273b228d868d0a4f679ab38b071f3ef8702a0e1be6b80666cd0c6681e9efdb1baf77f2f7d8
rdev-worker a1d0d1bf1c
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
build: /implement-feature community-ui --requirements 'Build the React commu...
2026-02-24 08:22:30 +00:00

18 lines
513 B
Plaintext

import { validateMimeType } from '../../utils';
import type { Oas2Rule } from '../../visitors';
import type { UserContext } from '../../walk';
export const RequestMimeType: Oas2Rule = ({ allowedValues }) => {
return {
Root(root, ctx: UserContext) {
validateMimeType({ type: 'consumes', value: root }, ctx, allowedValues);
},
Operation: {
leave(operation, ctx: UserContext) {
validateMimeType({ type: 'consumes', value: operation }, ctx, allowedValues);
},
},
};
};