persona-community-5/.pnpm-store/v3/files/80/39047e1ea7361bfa12dcaf6e04258cf0904a673d4451485d8d038a9827a8bf4dec62b68f843a9d8d58ff3b62514d94106d465a2041561534dfce49f61bfab6
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
514 B
Plaintext

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