You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The admin api has an incorrectly nested request body on the endpoint /admin/register/metadata.
On the endpoint Swagger JSON we see the following definitions:
"/admin/register/metadata": {
"post": {
"tags": ["Admin", "Register"],
"summary": "Metadata Update",
"description": "Indicate that a critical update to the metadata for Accredited Data Recipients has been made and should be obtained",
"operationId": "metadataUpdate",
"parameters": [
{
"in": "body",
"name": "action",
"required": true,
"schema": {
"$ref": "#/definitions/RequestMetaDataUpdate"
}
},
...]
...}
Expanding out the schemas gives us:
"parameters": [
{
"in": "body",
"name": "action",
"required": true,
"schema": {
"type": "object",
"required": ["data"],
"properties": {
"data": {
"type": "object",
"required": ["action"],
"properties": {
"action": {
"type": "string",
"description": "The action to take for the meta data. At the moment the only option is REFRESH which requires the data holder to call the ACCC to refresh meta data as soon as practicable",
"default": "REFRESH",
"enum": ["REFRESH"]
}
}
},
"meta": {
"$ref": "#/definitions/Meta"
}
}
},
...]
This gives us a body parameter action that has a field data that contains a field action.
Thus the final body object type that looks like this:
Admin API, specifically the post endpoint /admin/register/metadata
Change Proposed
I propose that the admin request bodies be documented the same way that the energy request bodies are documented, using the components/requestBodies area of the OpenAPI specification. This would also allow for type information application/json to be included in the definition.
The text was updated successfully, but these errors were encountered:
Hi @Aiden-Ziegelaar can you please confirm this is still an issue in release 1.17.0. The bug referenced no longer appears to be an issue in the latest Swagger.
Description
The admin api has an incorrectly nested request body on the endpoint /admin/register/metadata.
On the endpoint Swagger JSON we see the following definitions:
Expanding out the schemas gives us:
This gives us a body parameter
action
that has a fielddata
that contains a fieldaction
.Thus the final body object type that looks like this:
Compared to the documented type:
Area Affected
Admin API, specifically the post endpoint /admin/register/metadata
Change Proposed
I propose that the admin request bodies be documented the same way that the energy request bodies are documented, using the components/requestBodies area of the OpenAPI specification. This would also allow for type information
application/json
to be included in the definition.The text was updated successfully, but these errors were encountered: