persona-community-5/.pnpm-store/v3/files/29/fed0e797130eff14a944ce7ba8191a1d272a255234a42bed30ec497c7753c1a9ddccf8d52a59e4016b60a53c1a09c959eef7de1bfbea4854f4533464d4066a
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

16 lines
467 B
Plaintext

import type { Oas3Rule, Oas2Rule } from '../../visitors';
import type { UserContext } from '../../walk';
export const NoPathTrailingSlash: Oas3Rule | Oas2Rule = () => {
return {
PathItem(_path: any, { report, key, rawLocation }: UserContext) {
if ((key as string).endsWith('/') && key !== '/') {
report({
message: `\`${key}\` should not have a trailing slash.`,
location: rawLocation.key(),
});
}
},
};
};