File tree Expand file tree Collapse file tree 2 files changed +72
-1
lines changed Expand file tree Collapse file tree 2 files changed +72
-1
lines changed Original file line number Diff line number Diff line change @@ -14692,7 +14692,37 @@ paths:
1469214692 content :
1469314693 application/json :
1469414694 schema :
14695- $ref : ' #/components/schemas/TaskTemplateXO'
14695+ properties :
14696+ alertEmail :
14697+ description : e-mail for task notifications.
14698+ type : string
14699+ enabled :
14700+ description : Indicates if the task would be enabled.
14701+ type : boolean
14702+ frequency :
14703+ $ref : ' #/components/schemas/FrequencyXO'
14704+ name :
14705+ description : The name of the task template.
14706+ type : string
14707+ notificationCondition :
14708+ description : Condition required to notify a task execution.
14709+ enum :
14710+ - FAILURE
14711+ - SUCCESS_FAILURE
14712+ type : string
14713+ properties :
14714+ additionalProperties :
14715+ type : string
14716+ description : Additional properties for the task
14717+ type : object
14718+ type :
14719+ description : The type of task to be created.
14720+ type : string
14721+ required :
14722+ - enabled
14723+ - frequency
14724+ - name
14725+ - notificationCondition
1469614726 required : false
1469714727 responses :
1469814728 default :
Original file line number Diff line number Diff line change @@ -448,5 +448,46 @@ def parse_version_from_server_header(header: str) -> str:
448448 'schema' ]['$ref' ] = '#/components/schemas/SimpleApiGroupDeployRepository'
449449print (' Done' )
450450
451+ print ('Injecting requestBody schema for PUT /v1/tasks/{taskId}...' )
452+ json_spec ['paths' ]['/v1/tasks/{taskId}' ]['put' ]['requestBody' ]['content' ][('application' '/json' )]['schema' ] = {
453+ 'properties' : {
454+ 'alertEmail' : {
455+ 'description' : 'e-mail for task notifications.' ,
456+ 'type' : 'string'
457+ },
458+ 'enabled' : {
459+ 'description' : 'Indicates if the task would be enabled.' ,
460+ 'type' : 'boolean'
461+ },
462+ 'frequency' : {
463+ '$ref' : '#/components/schemas/FrequencyXO'
464+ },
465+ 'name' : {
466+ 'description' : 'The name of the task template.' ,
467+ 'type' : 'string'
468+ },
469+ 'notificationCondition' : {
470+ 'description' : 'Condition required to notify a task execution.' ,
471+ 'enum' : ['FAILURE' , 'SUCCESS_FAILURE' ],
472+ 'type' : 'string'
473+ },
474+ 'properties' : {
475+ 'additionalProperties' : {
476+ 'type' : 'string'
477+ },
478+ 'description' : 'Additional properties for the task' ,
479+ 'type' : 'object'
480+ },
481+ 'type' : {
482+ 'description' : 'The type of task to be created.' ,
483+ 'type' : 'string'
484+ }
485+ },
486+ 'required' : [
487+ 'enabled' , 'frequency' , 'name' , 'notificationCondition'
488+ ]
489+ }
490+ print (' Done' )
491+
451492with open ('./spec/openapi.yaml' , 'w' ) as output_yaml_specfile :
452493 output_yaml_specfile .write (yaml_dump (json_spec ))
You can’t perform that action at this time.
0 commit comments