Skip to content

Commit

Permalink
fix: #4 Fixing typo in error messages
Browse files Browse the repository at this point in the history
Signed-off-by: Laurent Broudoux <[email protected]>
  • Loading branch information
lbroudoux committed May 21, 2024
1 parent 2149058 commit bb04eea
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions functions/oas-verify-mocks-vacuum.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
function runRule(operation) {
const results = [];

// Collection prerequisites elements.
// Collect prerequisites elements.
let requestsExamples = collectRequestExampleNames(operation);
let pathParametersExamples = collectParameterExampleNames(operation, 'path');
let queryParametersExamples = collectParameterExampleNames(operation, 'query');
let headerParametersExamples = collectParameterExampleNames(operation, 'header');

//Now see if we can build complete responses.
// Now see if we can build complete responses.
let responsesExamples = collectResponseExampleNames(operation);

// Consider the responses with content.
Expand Down
6 changes: 3 additions & 3 deletions functions/oas-verify-mocks.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default createRulesetFunction(

const hints = (process.env.MICROCKS_HINTS === 'true') || false;

// Collection prerequisites elements.
// Collect prerequisites elements.
let requestsExamples = collectRequestExampleNames(operation);
let pathParametersExamples = collectParameterExampleNames(operation, 'path');
let queryParametersExamples = collectParameterExampleNames(operation, 'query');
Expand Down Expand Up @@ -82,7 +82,7 @@ export default createRulesetFunction(
if (!responsesExamples.includes(param) && !microcksRefs.includes(param)) {

results.push({
message: `\u2139\ufe0f Path parameter example '${param}' is not used in any response. It requires to have a matching response example or a x-microcks-ref to be considered as valid mock for Microcks.`,
message: `\u2139\ufe0f Path parameter example '${param}' is not used in any response. It requires to have a matching response example or a x-microcks-refs to be considered as valid mock for Microcks.`,
path: [...context.path, 'responses']
})

Expand All @@ -97,7 +97,7 @@ export default createRulesetFunction(
if (!responsesExamples.includes(request) && !microcksRefs.includes(request)) {

results.push({
message: `\u2139\ufe0f Request body example '${request}' is not used in any response. It requires to have a matching response example or a x-microcks-ref to be considered as valid mock for Microcks.`,
message: `\u2139\ufe0f Request body example '${request}' is not used in any response. It requires to have a matching response example or a x-microcks-refs to be considered as valid mock for Microcks.`,
path: [...context.path, 'responses']
})

Expand Down

0 comments on commit bb04eea

Please sign in to comment.