Skip to content

Commit

Permalink
Merge pull request #582 from jennydaman/add-previous_id-to-openapi
Browse files Browse the repository at this point in the history
Manually add previous_id to OpenAPI PluginInstanceRequest
  • Loading branch information
jennydaman authored Oct 1, 2024
2 parents b89b8a4 + a24fb14 commit a1b1d0a
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion chris_backend/plugininstances/spectacular_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ def additionalproperties_for_plugins_instances_create(result, **_kwargs):
:param result: an OpenAPI specification
"""
result['components']['schemas']['PluginInstanceRequest']['additionalProperties'] = {}
plugin_instance_request = result['components']['schemas']['PluginInstanceRequest']
assert plugin_instance_request['type'] == 'object'
plugin_instance_request['additionalProperties'] = {}
plugin_instance_request['properties']['previous_id'] = {
'type': 'integer',
'minimum': 1,
'maximum': 2147483647,
'nullable': True
}
return result

0 comments on commit a1b1d0a

Please sign in to comment.