Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,6 @@
[submodule "customers/openbanking/openbanking-sdks"]
path = customers/openbanking/openbanking-sdks
url = https://github.com/konfig-dev/openbanking-sdks.git
[submodule "customers/tubelightcommunications/tubelightcommunications-sdks"]
path = customers/tubelightcommunications/tubelightcommunications-sdks
url = https://github.com/konfig-dev/tubelightcommunications-sdks.git
13 changes: 13 additions & 0 deletions generator/konfig-dash/packages/konfig-cli/src/util/fix-progress.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ const progressSchema = z.object({
ignoreObjectsWithNoProperties: z.boolean().optional(),
ignorePotentialIncorrectType: z.boolean().optional(),
fixOnlyOneTagName: fixOnlyOneTagNameSchema.or(z.literal(false)).optional(),
nonExistentSecurityMapping: z
.record(z.string(), z.string().optional())
.optional()
.default({}),
validServerUrls: z
.record(z.string(), z.object({ url: z.string() }).optional())
.optional()
Expand Down Expand Up @@ -222,6 +226,15 @@ export class Progress {
return this.progress.ignoreObjectsWithNoProperties
}

getNonExistentSecurityMapping(name: string) {
return this.progress.nonExistentSecurityMapping[name]
}

setNonExistentSecurityMapping(name: string, mapping: string) {
this.progress.nonExistentSecurityMapping[name] = mapping
this.save()
}

setFixOnlyOneTagNameToFalse() {
this.progress.fixOnlyOneTagName = false
this.save()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,11 @@ export async function findRedundantSecurityRequirementAndParameter({
const requiredSecuritySchemes = securityRequirements.flatMap((requirement) =>
Object.keys(requirement).map((name) => {
const scheme = securitySchemes[name]
if (scheme === undefined)
if (scheme === undefined) {
throw Error(
`Found security requirement ${name} referring to non-existent security scheme`
)
}
return scheme
})
)
Expand Down