Skip to content

Commit

Permalink
handle extraction of openApi boolean examples
Browse files Browse the repository at this point in the history
Improve authTest by handeling boolean example extractions.
Remove example override not needed after this change.
  • Loading branch information
jNullj committed Jun 8, 2024
1 parent 263aba7 commit 669d913
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
3 changes: 0 additions & 3 deletions services/azure-devops/azure-devops-tests.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ describe('AzureDevOpsTests', function () {
],
},
{
exampleOverride: {
compact_message: undefined,
},
multipleRequests: true,
},
)
Expand Down
1 change: 0 additions & 1 deletion services/jenkins/jenkins-tests.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ describe('JenkinsTests', function () {
{ actions: [{ totalCount: 3, failCount: 2, skipCount: 1 }] },
{
configOverride: authConfigOverride,
exampleOverride: { compact_message: '' },
},
)
})
Expand Down
6 changes: 5 additions & 1 deletion services/test-helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,11 @@ function getBadgeExampleCall(serviceClass, paramType) {
// reformat structure for serviceClass.invoke
const exampleInvokeParams = firstOpenapiExampleParams.reduce((acc, obj) => {
if (obj.in === paramType) {
acc[obj.name] = obj.example
let example = obj.example
if (obj?.schema?.type === 'boolean') {
example = example || ''
}
acc[obj.name] = example
}
return acc
}, {})
Expand Down

0 comments on commit 669d913

Please sign in to comment.