persona-community-5/.pnpm-store/v3/files/e8/3cfe32854b2918c8b096092db96531c92bf0a8ea1d62490bdee0e228d7350e276840db927e81741b4c18790fb3a7c11c6bdd6f406872488e8cd3a4913ad727
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

57 lines
1.2 KiB
Plaintext

const id = 'test-plugin';
/** @type {import('../../config').PreprocessorsConfig} */
const preprocessors = {
oas2: {
'description-preprocessor': () => {
return {
Info(info) {
const title = info.title || 'API title';
info.description = `# ${title}\n\n${info.description || ''}`;
},
};
},
},
};
/** @type {import('../../config').CustomRulesConfig} */
const rules = {
oas3: {
'openid-connect-url-well-known': () => {
return {
SecurityScheme(scheme, { location, report }) {
if (scheme.type === 'openIdConnect') {
if (!scheme.openIdConnectUrl.endsWith('/.well-known/openid-configuration')) {
report({
message:
'openIdConnectUrl must be a URL that ends with /.well-known/openid-configuration',
location: location.child('openIdConnectUrl'),
});
}
}
},
};
},
},
};
/** @type {import('../../config').DecoratorsConfig} */
const decorators = {
oas3: {
'inject-x-stats': () => {
return {
Info(info) {
info['x-stats'] = { test: 1 };
},
};
},
},
};
module.exports = {
id,
preprocessors,
rules,
decorators,
};