Skip to content

Commit

Permalink
Add empty descriptions where missing.
Browse files Browse the repository at this point in the history
  • Loading branch information
dblock committed Oct 30, 2024
1 parent 05c5254 commit b9b4f4e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tools/src/merger/OpenApiMerger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export default class OpenApiMerger {
this.#merge_schemas()
this.#merge_namespaces()
this.#sort_spec_keys()
this.#add_defaults()
this.#generate_global_params()
this.#generate_superseded_ops()
this._merged = true
Expand Down Expand Up @@ -134,6 +135,13 @@ export default class OpenApiMerger {
})
}

#add_defaults(): void {
// Add default descriptions
Object.entries(this._spec.components.responses as Document).forEach(([_path, response_item]) => {
if (response_item.description === undefined) response_item.description = ''
})
}

// Generate global parameters from _global_params.yaml file.
#generate_global_params (): void {
const gen = new GlobalParamsGenerator(this.root_folder)
Expand Down

0 comments on commit b9b4f4e

Please sign in to comment.