persona-community-5/.pnpm-store/v3/files/40/2967c7535b802f012774f3f84f88680ad30efc54b42d75e51fc439a1ac0bf6ec653422b91d0ebfbd1d27adfd7d15f24ab6e06f5e7e38b093c42a9a617610e1
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

32 lines
878 B
Plaintext

import { validateMimeTypeOAS3 } from '../../utils';
import type { Oas3Rule } from '../../visitors';
import type { UserContext } from '../../walk';
export const ResponseMimeType: Oas3Rule = ({ allowedValues }) => {
return {
Paths: {
Response: {
leave(response, ctx: UserContext) {
validateMimeTypeOAS3({ type: 'produces', value: response }, ctx, allowedValues);
},
},
Callback: {
Response() {},
RequestBody: {
leave(requestBody, ctx: UserContext) {
validateMimeTypeOAS3({ type: 'produces', value: requestBody }, ctx, allowedValues);
},
},
},
},
WebhooksMap: {
RequestBody: {
leave(requestBody, ctx: UserContext) {
validateMimeTypeOAS3({ type: 'produces', value: requestBody }, ctx, allowedValues);
},
},
},
};
};