persona-community-5/.pnpm-store/v3/files/21/2db7cab02e1cf8e57c1e852ddae9338cf9c13fb072c07bdd8255bac1a3e4b36ec4fed84db37d1f7bc35657a640f5b132152cd6bc19c7cdf992bfb3b9c9cec8
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

23 lines
809 B
Plaintext

import type { Oas3Rule, Oas2Rule } from '../../visitors';
import type { Oas2Parameter } from '../../typings/swagger';
import type { Oas3Parameter } from '../../typings/openapi';
import type { UserContext } from '../../walk';
export const ParameterDescription: Oas3Rule | Oas2Rule = () => {
return {
Parameter(parameter: Oas2Parameter | Oas3Parameter, { report, location }: UserContext) {
if (parameter.description === undefined) {
report({
message: 'Parameter object description must be present.',
location: { reportOnKey: true },
});
} else if (!parameter.description) {
report({
message: 'Parameter object description must be non-empty string.',
location: location.child(['description']),
});
}
},
};
};