persona-community-5/.pnpm-store/v3/files/3f/2b7440207d30b8688ae716217b5cdf8bd1f93eb0596261e5a4de11be8f71cad3e7c0d11118861146b774e796d492bfa66f684a27b09c7aad94520fef184e16
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

30 lines
1.2 KiB
Plaintext

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ArrayParameterSerialization = void 0;
const ref_utils_1 = require("../../ref-utils");
const ArrayParameterSerialization = (options) => {
return {
Parameter: {
leave(node, ctx) {
if (!node.schema) {
return;
}
const schema = ((0, ref_utils_1.isRef)(node.schema) ? ctx.resolve(node.schema).node : node.schema);
if (schema &&
shouldReportMissingStyleAndExplode(node, schema, options)) {
ctx.report({
message: `Parameter \`${node.name}\` should have \`style\` and \`explode \` fields`,
location: ctx.location,
});
}
},
},
};
};
exports.ArrayParameterSerialization = ArrayParameterSerialization;
function shouldReportMissingStyleAndExplode(node, schema, options) {
return ((schema.type === 'array' || schema.items || schema.prefixItems) &&
(node.style === undefined || node.explode === undefined) &&
(!options.in || (node.in && options.in?.includes(node.in))));
}