swagger-api / swagger-ui

Swagger UI is a collection of HTML, JavaScript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API.
https://swagger.io
Apache License 2.0
26.49k stars 8.96k forks source link

Swagger-ui-react + editor.swagger.io missing data in example value response #7150

Open TomPeirs opened 3 years ago

TomPeirs commented 3 years ago

Q&A (please complete the following information)

Content & configuration

Example Swagger/OpenAPI definition:

{
    "components": {
        "examples": {
            "GetUserListXml": {
                "value": "<response>\n  <rest_links>\n    <rest_link href=\"http://localhost:8080/ADOxxWeb/rest/2.0/users\" method=\"GET\" rel=\"self\"/>\n  </rest_links>\n  <users>\n    <user id=\"{4e27ebd4-796a-4614-abd6-0af61a48a94a}\">\n      <rest_links>\n        <rest_link href=\"http://localhost:8080/ADOxxWeb/rest/2.0/users/id/4e27ebd4-796a-4614-abd6-0af61a48a94a\" method=\"GET\" rel=\"self\"/>\n      </rest_links>\n      <loginName><![CDATA[susan]]></loginName>\n    </user>\n    <user id=\"{a0f33384-3ac6-44ae-a898-8f855633bbbd}\">\n      <rest_links>\n        <rest_link href=\"http://localhost:8080/ADOxxWeb/rest/2.0/users/id/a0f33384-3ac6-44ae-a898-8f855633bbbd\" method=\"GET\" rel=\"self\"/>\n      </rest_links>\n      <loginName><![CDATA[rich]]></loginName>\n    </user>\n    <user id=\"{d329114f-2ad3-415f-9bfe-8b8b4b182aba}\">\n      <rest_links>\n        <rest_link href=\"http://localhost:8080/ADOxxWeb/rest/2.0/users/id/d329114f-2ad3-415f-9bfe-8b8b4b182aba\" method=\"GET\" rel=\"self\"/>\n      </rest_links>\n      <loginName><![CDATA[reader]]></loginName>\n    </user>\n  </users>\n</response>"
            },
            "GetUserXml": {
                "value": "<response>\n  <locale>en</locale>\n  <user id=\"{8a080580-fa71-4868-81b4-3bb03b972704}\" admin=\"false\" system=\"false\">\n    <rest_links>\n      <rest_link href=\"http://localhost:8080/ADOxxWeb/rest/2.0/users/login/peter\" method=\"GET\" rel=\"self\"/>\n      <rest_link href=\"http://localhost:8080/ADOxxWeb/rest/2.0/users/login/peter\" method=\"DELETE\" rel=\"delete\"/>\n    </rest_links>\n    <loginName><![CDATA[peter]]></loginName>\n    <roles>\n      <role metaName=\"Common\">\n        <rest_links>\n          <rest_link href=\"http://localhost:8080/ADOxxWeb/rest/2.0/roles/none/Common\" method=\"GET\" rel=\"self\"/>\n        </rest_links>\n        <name><![CDATA[Design & Document]]></name>\n      </role>\n      <role metaName=\"MODELLER\" parentId=\"{3ad30848-5a75-484c-b27c-5ab621932dc9}\">\n        <rest_links>\n          <rest_link href=\"http://localhost:8080/ADOxxWeb/rest/2.0/roles/3ad30848-5a75-484c-b27c-5ab621932dc9/MODELLER\" method=\"GET\" rel=\"self\"/>\n        </rest_links>\n        <name><![CDATA[Modeller]]></name>\n      </role>\n      <role metaName=\"REVIEWER (M)\" parentId=\"{3ad30848-5a75-484c-b27c-5ab621932dc9}\">\n        <rest_links>\n          <rest_link href=\"http://localhost:8080/ADOxxWeb/rest/2.0/roles/3ad30848-5a75-484c-b27c-5ab621932dc9/REVIEWER%20%28M%29\" method=\"GET\" rel=\"self\"/>\n        </rest_links>\n        <name><![CDATA[Reviewer (methodical)]]></name>\n      </role>\n      <role metaName=\"Reader\">\n        <rest_links>\n          <rest_link href=\"http://localhost:8080/ADOxxWeb/rest/2.0/roles/none/Reader\" method=\"GET\" rel=\"self\"/>\n        </rest_links>\n        <name><![CDATA[Read & Explore]]></name>\n      </role>\n      <role metaName=\"Reviewer\">\n        <rest_links>\n          <rest_link href=\"http://localhost:8080/ADOxxWeb/rest/2.0/roles/none/Reviewer\" method=\"GET\" rel=\"self\"/>\n        </rest_links>\n        <name><![CDATA[Control & Release]]></name>\n      </role>\n    </roles>\n    <repos>\n      <repo id=\"{02388b8c-c8f3-4bd4-b9bb-a109bb4326b8}\">\n        <name><![CDATA[Standard-Repository]]></name>\n      </repo>\n    </repos>\n    <usergroups>\n      <group id=\"{db977b96-c704-4926-9305-7e86043f885a}\">\n        <rest_links>\n          <rest_link href=\"http://localhost:8080/ADOxxWeb/rest/2.0/usergroups/db977b96-c704-4926-9305-7e86043f885a\" method=\"GET\" rel=\"self\"/>\n        </rest_links>\n        <name><![CDATA[Default group]]></name>\n      </group>\n    </usergroups>\n    <attributes>\n      <attribute xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" metaName=\"FORENAME\" attrType=\"STRING\" xsi:type=\"string\">\n        <name><![CDATA[First name]]></name>\n        <value><![CDATA[Peter]]></value>\n      </attribute>\n      <attribute xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" metaName=\"SURNAME\" attrType=\"STRING\" xsi:type=\"string\">\n        <name><![CDATA[Last name]]></name>\n        <value><![CDATA[Risk]]></value>\n      </attribute>\n      <attribute xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" metaName=\"MUST_CHANGE_PASSWORD\" attrType=\"INTEGER\" xsi:type=\"number\">\n        <name><![CDATA[User must change the password]]></name>\n        <value><![CDATA[1.0]]></value>\n      </attribute>\n      <attribute xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" metaName=\"ACCOUNT_DISABLED\" attrType=\"INTEGER\" xsi:type=\"number\">\n        <name><![CDATA[Account disabled]]></name>\n        <value><![CDATA[0.0]]></value>\n      </attribute>\n      <attribute xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" metaName=\"TELEPHONE_NUMBER\" attrType=\"SHORTSTRING\" xsi:type=\"string\">\n        <name><![CDATA[Telephone number]]></name>\n        <value/>\n      </attribute>\n      <attribute xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" metaName=\"DESCRIPTION\" attrType=\"LONGSTRING\" xsi:type=\"string\">\n        <name><![CDATA[User-specific Information]]></name>\n        <value/>\n      </attribute>\n      <attribute xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" metaName=\"EMAIL\" attrType=\"STRING\" xsi:type=\"string\">\n        <name><![CDATA[Email]]></name>\n        <value/>\n      </attribute>\n      <attribute xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" metaName=\"ROOM\" attrType=\"SHORTSTRING\" xsi:type=\"string\">\n        <name><![CDATA[Room]]></name>\n        <value/>\n      </attribute>\n      <attribute xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" metaName=\"TYPE_OF_OCCUPATION\" attrType=\"SHORTSTRING\" xsi:type=\"string\">\n        <name><![CDATA[Type of occupation]]></name>\n        <value/>\n      </attribute>\n      <attribute xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" metaName=\"FORM_OF_ADDRESS\" attrType=\"SHORTSTRING\" xsi:type=\"string\">\n        <name><![CDATA[Form of address]]></name>\n        <value/>\n      </attribute>\n      <attribute xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" metaName=\"INACTIVE_SINCE\" attrType=\"UTC\" xsi:type=\"date\">\n        <name><![CDATA[Inactive since]]></name>\n        <value><![CDATA[1970-01-01T00:00:00]]></value>\n      </attribute>\n    </attributes>\n  </user>\n</response>\n"
            }
        },
        "headers": {
            "LocationHeader": {
                "description": "Link to the created or modified resource",
                "required": false,
                "schema": {
                    "format": "uri",
                    "type": "string"
                }
            }
        },
        "links": {
            "deleteRelation": {
                "description": "Path: `/rest/2.0/repos/{repo_id}/objects/{object_id}/relations/{direction}/{rel_name}/{artefact_id}`\n|Method|Relation|Position in response|\n|:------:|:------:|:------:|\n|DELETE|delete|root|\n",
                "operationId": "Hateoas Link"
            },
            "relationModelArtefact": {
                "description": "Path: `/rest/2.0/repos/{repo_id}/models/{model_id}`\n|Method|Relation|Position in response|\n|:------:|:------:|:------:|\n|GET|self|from or to|\n",
                "operationId": "Hateoas Link"
            },
            "relationModellingInstanceArtefact": {
                "description": "Path: `/rest/2.0/repos/{repo_id}/models/{model_id}/objects/{object_id}`\n|Method|Relation|Position in response|\n|:------:|:------:|:------:|\n|GET|self|from or to|\n",
                "operationId": "Hateoas Link"
            },
            "relationObjectArtefact": {
                "description": "Path: `/rest/2.0/repos/{repo_id}/objects/{object_id}`\n|Method|Relation|Position in response|\n|:------:|:------:|:------:|\n|GET|self|from or to|\n",
                "operationId": "Hateoas Link"
            },
            "updateRelation": {
                "description": "Path: `/rest/2.0/repos/{repo_id}/objects/{object_id}/relations/{direction}/{rel_name}/{artefact_id}`\n|Method|Relation|Position in response|\n|:------:|:------:|:------:|\n|PATCH|patch|root|\n",
                "operationId": "Hateoas Link"
            }
        },
        "schemas": {
            "GetUserList": {
                "description": "Response for getting a list of users",
                "properties": {
                    "rest_links": {
                        "example": [
                            {
                                "href": "http://localhost:8080/ADOxxWeb/rest/2.0/users",
                                "method": "GET",
                                "rel": "self"
                            }
                        ],
                        "items": {
                            "$ref": "#/components/schemas/Restlink"
                        },
                        "readOnly": true,
                        "type": "array",
                        "xml": {
                            "wrapped": true
                        }
                    },
                    "users": {
                        "description": "List of all users",
                        "items": {
                            "$ref": "#/components/schemas/User"
                        },
                        "readOnly": true,
                        "type": "array",
                        "xml": {
                            "wrapped": true
                        }
                    }
                },
                "type": "object",
                "xml": {
                    "name": "response"
                }
            },
            "DetailedUser": {
                "allOf": [
                    {
                        "$ref": "#/components/schemas/User"
                    },
                    {
                        "properties": {
                            "admin": {
                                "description": "True if user is an administrator",
                                "example": false,
                                "readOnly": true,
                                "type": "boolean",
                                "xml": {
                                    "attribute": true
                                }
                            },
                            "attributes": {
                                "description": "Attributes of the user",
                                "items": {
                                    "$ref": "#/components/schemas/PrimitiveAttribute"
                                },
                                "type": "array"
                            },
                            "password": {
                                "description": "Password of the user",
                                "example": "Adonis2011!",
                                "format": "password",
                                "type": "string",
                                "writeOnly": true
                            },
                            "repos": {
                                "items": {
                                    "$ref": "#/components/schemas/BasicRepo"
                                },
                                "type": "array"
                            },
                            "rest_links": {
                                "example": [
                                    {
                                        "href": "http://localhost:8080/ADOxxWeb/rest/2.0/users/login/peter",
                                        "method": "GET",
                                        "rel": "self"
                                    },
                                    {
                                        "href": "http://localhost:8080/ADOxxWeb/rest/2.0/users/login/peter",
                                        "method": "DELETE",
                                        "rel": "delete"
                                    },
                                    {
                                        "href": "http://localhost:8080/ADOxxWeb/rest/2.0/users/login/peter",
                                        "method": "PATCH",
                                        "rel": "patch"
                                    }
                                ]
                            },
                            "roles": {
                                "description": "Roles of the user",
                                "items": {
                                    "$ref": "#/components/schemas/Role"
                                },
                                "type": "array",
                                "xml": {
                                    "wrapped": true
                                }
                            },
                            "sharedRepos": {
                                "items": {
                                    "$ref": "#/components/schemas/BasicRepo"
                                },
                                "type": "array"
                            },
                            "system": {
                                "description": "True if the user is a system user",
                                "example": false,
                                "readOnly": true,
                                "type": "boolean",
                                "xml": {
                                    "attribute": true
                                }
                            },
                            "usergroups": {
                                "description": "Usergroups the user belongs to",
                                "items": {
                                    "$ref": "#/components/schemas/Usergroup"
                                },
                                "type": "array",
                                "xml": {
                                    "wrapped": true
                                }
                            }
                        },
                        "required": [
                            "loginName",
                            "password"
                        ],
                        "type": "object"
                    }
                ]
            },
            "GetUser": {
                "description": "Response for getting information about a specified user",
                "properties": {
                    "locale": {
                        "$ref": "#/components/schemas/Locale"
                    },
                    "user": {
                        "$ref": "#/components/schemas/DetailedUser"
                    }
                },
                "type": "object",
                "xml": {
                    "name": "response"
                }
            },
            "UpdateUserAttributes": {
                "description": "Request body for modifying user attributes",
                "properties": {
                    "attributes": {
                        "items": {
                            "$ref": "#/components/schemas/PrimitiveAttribute"
                        },
                        "type": "array"
                    }
                },
                "type": "object"
            },
            "AddUserToRepo": {
                "description": "Request body for adding user into a repository",
                "properties": {
                    "id": {
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/id"
                            }
                        ],
                        "readOnly": false,
                        "writeOnly": true
                    }
                }
            },
            "Role": {
                "description": "Represents basic information about a specific role",
                "properties": {
                    "metaName": {
                        "description": "Language independant name",
                        "example": "REVIEWER (B)",
                        "type": "string",
                        "xml": {
                            "attribute": true
                        }
                    },
                    "name": {
                        "description": "Name depending on the language selected",
                        "example": "Reviewer (business)",
                        "readOnly": true,
                        "type": "string"
                    },
                    "parentId": {
                        "description": "Id of the parent group",
                        "example": "{3ad30848-5a75-484c-b27c-5ab621932dc9}",
                        "type": "string",
                        "xml": {
                            "attribute": true
                        }
                    },
                    "rest_links": {
                        "example": [
                            {
                                "href": "http://localhost:8080/ADOxxWeb/rest/2.0/roles/3ad30848-5a75-484c-b27c-5ab621932dc9/REVIEWER%20%28B%29",
                                "method": "GET",
                                "rel": "self"
                            }
                        ],
                        "items": {
                            "$ref": "#/components/schemas/Restlink"
                        },
                        "readOnly": true,
                        "type": "array",
                        "xml": {
                            "name": "rest_links",
                            "wrapped": true
                        }
                    }
                },
                "required": [
                    "metaName"
                ],
                "type": "object",
                "xml": {
                    "name": "role"
                }
            },
            "AddUserToUsergroup": {
                "description": "Request body for assigning user to a usergroup",
                "properties": {
                    "id": {
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/id_2"
                            }
                        ],
                        "readOnly": false,
                        "writeOnly": true
                    }
                }
            },
            "Restlink": {
                "description": "Representation of HATEOAS rest link",
                "properties": {
                    "href": {
                        "default": "$url",
                        "description": "Target URI",
                        "format": "url",
                        "type": "string",
                        "xml": {
                            "attribute": true
                        }
                    },
                    "method": {
                        "description": "Http method",
                        "enum": [
                            "GET",
                            "POST",
                            "PUT",
                            "PATCH",
                            "DELETE"
                        ],
                        "type": "string",
                        "xml": {
                            "attribute": true
                        }
                    },
                    "rel": {
                        "default": "self",
                        "description": "Describes how the current context (source) is related to the target resource.",
                        "type": "string",
                        "xml": {
                            "attribute": true
                        }
                    }
                },
                "type": "object",
                "xml": {
                    "name": "rest_link"
                }
            },
            "User": {
                "properties": {
                    "id": {
                        "description": "Id of the user",
                        "format": "uuid",
                        "readOnly": true,
                        "type": "string",
                        "xml": {
                            "attribute": true
                        }
                    },
                    "loginName": {
                        "description": "User's login",
                        "example": "Guest",
                        "type": "string"
                    },
                    "rest_links": {
                        "example": [
                            {
                                "href": "http://localhost:8080/ADOxxWeb/rest/2.0/users/id/1ef6fe3f-9f9b-42f4-82b3-ea1db1ae08d7",
                                "method": "GET",
                                "rel": "self"
                            }
                        ],
                        "items": {
                            "$ref": "#/components/schemas/Restlink"
                        },
                        "readOnly": true,
                        "type": "array",
                        "xml": {
                            "wrapped": true
                        }
                    }
                },
                "required": [
                    "loginName"
                ],
                "type": "object"
            },
            "PrimitiveAttribute": {
                "allOf": [
                    {
                        "$ref": "#/components/schemas/AttributeCore"
                    },
                    {
                        "properties": {
                            "value": {
                                "description": "Language specific value of attribute. For date value insert integer with timestamp represented in miliseconds.",
                                "example": "Sample description...",
                                "oneOf": [
                                    {
                                        "type": "string"
                                    },
                                    {
                                        "format": "double",
                                        "type": "number"
                                    },
                                    {
                                        "type": "integer"
                                    },
                                    {
                                        "type": "boolean"
                                    }
                                ]
                            }
                        },
                        "type": "object"
                    }
                ],
                "description": "Representation of attribute of primitive type value"
            },
            "BasicRepo": {
                "description": "Schema representing a basic repository object",
                "properties": {
                    "id": {
                        "description": "Id of the repository",
                        "format": "uuid",
                        "type": "string",
                        "xml": {
                            "attribute": true
                        }
                    },
                    "name": {
                        "description": "Name of the repository",
                        "example": "Standard-Repository",
                        "readOnly": true,
                        "type": "string"
                    }
                },
                "type": "object",
                "xml": {
                    "name": "repo"
                }
            },
            "Usergroup": {
                "allOf": [
                    {
                        "$ref": "#/components/schemas/GroupItem"
                    },
                    {
                        "description": "Basic information about a group of users",
                        "properties": {
                            "id": {
                                "example": "{a18c6786-7f19-455e-b666-e51d9ade038e}"
                            },
                            "name": {
                                "example": "ADO_ROOT_OBJECT_GROUP"
                            },
                            "rest_links": {
                                "example": [
                                    {
                                        "href": "http://localhost:8080/ADOxxWeb/rest/2.0/usergroups/a18c6786-7f19-455e-b666-e51d9ade038e",
                                        "method": "GET",
                                        "rel": "self"
                                    }
                                ]
                            }
                        },
                        "type": "object"
                    }
                ]
            },
            "Locale": {
                "description": "Language of the request/response",
                "enum": [
                    "en",
                    "de",
                    "pl",
                    "es",
                    "fr"
                ],
                "type": "string"
            },
            "id": {
                "description": "Id of the repository",
                "format": "uuid",
                "type": "string",
                "xml": {
                    "attribute": true
                }
            },
            "id_2": {
                "description": "Id of the group",
                "format": "uuid",
                "type": "string",
                "xml": {
                    "attribute": true
                }
            },
            "AttributeCore": {
                "description": "Base schema for attributes",
                "properties": {
                    "attrType": {
                        "description": "Metamodel type of attribute",
                        "example": "STRING",
                        "readOnly": true,
                        "type": "string",
                        "xml": {
                            "attribute": true
                        }
                    },
                    "metaName": {
                        "description": "Language specific metaname of attribute",
                        "example": "A_DESCRIPTION",
                        "type": "string",
                        "xml": {
                            "attribute": true
                        }
                    },
                    "name": {
                        "description": "Language specific name of attribute",
                        "example": "Description",
                        "readOnly": true,
                        "type": "string"
                    }
                },
                "required": [
                    "metaName"
                ],
                "type": "object",
                "xml": {
                    "name": "attribute"
                }
            },
            "GroupItem": {
                "description": "Schema for representing group object",
                "properties": {
                    "id": {
                        "description": "Id of the group",
                        "format": "uuid",
                        "type": "string",
                        "xml": {
                            "attribute": true
                        }
                    },
                    "name": {
                        "description": "Name of the group",
                        "readOnly": true,
                        "type": "string"
                    },
                    "rest_links": {
                        "items": {
                            "$ref": "#/components/schemas/Restlink"
                        },
                        "readOnly": true,
                        "type": "array",
                        "xml": {
                            "name": "rest_links",
                            "wrapped": true
                        }
                    }
                },
                "type": "object",
                "xml": {
                    "name": "group"
                }
            }
        },
        "securitySchemes": {
            "BasicAuth": {
                "scheme": "basic",
                "type": "http"
            },
            "oAuth2": {
                "description": "ADOxx OAuth",
                "flows": {
                    "authorizationCode": {
                        "authorizationUrl": "http://localhost:8080/ADOxxWeb/oauth2/authorize",
                        "refreshUrl": "http://localhost:8080/ADOxxWeb/oauth2/token",
                        "scopes": {},
                        "tokenUrl": "http://localhost:8080/ADOxxWeb/oauth2/token"
                    }
                },
                "type": "oauth2"
            }
        }
    },
    "info": {
        "description": "",
        "title": "RESTful interfaces documentation",
        "version": "2.0.0"
    },
    "openapi": "3.0.2",
    "security": [
        {
            "BasicAuth": []
        },
        {
            "oAuth2": []
        }
    ],
    "servers": [
        {
            "url": "{hostname}",
            "variables": {
                "hostname": {
                    "default": "https://localhost:8080/ADOxx"
                }
            }
        }
    ],
    "paths": {
        "/rest/2.0/users": {
            "get": {
                "description": "Endpoint for retrieving a list of users",
                "operationId": "getUserList",
                "parameters": [
                    {
                        "description": "Accept header",
                        "in": "header",
                        "name": "Accept",
                        "required": false,
                        "schema": {
                            "enum": [
                                "application/json",
                                "application/xml"
                            ],
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/GetUserList"
                                }
                            },
                            "application/xml": {
                                "examples": {
                                    "xmlExample": {
                                        "$ref": "#/components/examples/GetUserListXml"
                                    }
                                },
                                "schema": {
                                    "$ref": "#/components/schemas/GetUserList"
                                }
                            }
                        },
                        "description": "JSON or XML document containing a list of users",
                        "links": {
                            "Link_to_every_user_that_is_included_in_the_list": {
                                "description": "Path: `/rest/2.0/users/id/{user_id}`\n|Method|Relation|Position in response|\n|:------:|:------:|:------:|\n|GET|self|user|\n",
                                "operationId": "Hateoas Link"
                            },
                            "Self_link": {
                                "description": "Path: `/rest/2.0/users`\n|Method|Relation|Position in response|\n|:------:|:------:|:------:|\n|GET|self|root|\n",
                                "operationId": "Hateoas Link"
                            }
                        }
                    },
                    "401": {
                        "description": "(Unauthorized Access) Request lacks valid authentication credentials"
                    },
                    "403": {
                        "description": "(Forbidden) No access to that action"
                    },
                    "500": {
                        "description": "(Internal Server Error) An unexpected server issue was encountered"
                    }
                },
                "summary": "Get user list",
                "tags": [
                    "Users",
                    "Users read APIs"
                ]
            },
            "post": {
                "description": "Endpoint for creating a user",
                "operationId": "createUser",
                "parameters": [
                    {
                        "description": "Content type of body",
                        "in": "header",
                        "name": "Content-type",
                        "required": true,
                        "schema": {
                            "enum": [
                                "application/json"
                            ],
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/DetailedUser"
                            }
                        }
                    },
                    "description": "Possible attribute values:  \n```\nFORENAME, SURNAME, MUST_CHANGE_PASSWORD, ACCOUNT_DISABLED, TELEPHONE_NUMBER, DESCRIPTION, EMAIL, ROOM, TYPE_OF_OCCUPATION, FORM_OF_ADDRESS, INACTIVE_SINCE, LOGIN_MECHANISM, LDAP_GUID\n```\n"
                },
                "responses": {
                    "201": {
                        "description": "Successfully created a user",
                        "headers": {
                            "Location": {
                                "$ref": "#/components/headers/LocationHeader"
                            }
                        }
                    },
                    "400": {
                        "description": "(Bad Request) Wrong data was passed in request body"
                    },
                    "401": {
                        "description": "(Unauthorized Access) Request lacks valid authentication credentials"
                    },
                    "403": {
                        "description": "(Forbidden) No access to that action"
                    },
                    "404": {
                        "description": "(Not Found) Some of the referenced resources do not exist"
                    },
                    "409": {
                        "description": "(Conflict) The user login is already taken"
                    },
                    "500": {
                        "description": "(Internal Server Error) An unexpected server issue was encountered"
                    }
                },
                "summary": "Create user",
                "tags": [
                    "Users",
                    "Users write APIs"
                ]
            }
        },
        "/rest/2.0/users/{identification_method}/{user_identifier}": {
            "delete": {
                "description": "Endpoint for deleting a specified user",
                "operationId": "deleteUser",
                "parameters": [
                    {
                        "description": "Attribute that will be used to find the user",
                        "in": "path",
                        "name": "identification_method",
                        "required": true,
                        "schema": {
                            "enum": [
                                "id",
                                "login"
                            ],
                            "example": "login",
                            "type": "string"
                        }
                    },
                    {
                        "description": "The value of the attribute used to find the user, either id or login",
                        "in": "path",
                        "name": "user_identifier",
                        "required": true,
                        "schema": {
                            "example": "guest",
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "User successfully deleted"
                    },
                    "401": {
                        "description": "(Unauthorized Access) Request lacks valid authentication credentials"
                    },
                    "403": {
                        "description": "(Forbidden) No access to that action or no access to passed in body objectgroup"
                    },
                    "404": {
                        "description": "(Not Found) User does not exist"
                    },
                    "423": {
                        "description": "(Locked) User is locked by another application"
                    },
                    "500": {
                        "description": "(Internal Server Error) An unexpected server issue was encountered"
                    }
                },
                "summary": "Delete user",
                "tags": [
                    "Users",
                    "Users write APIs"
                ]
            },
            "get": {
                "description": "Endpoint for retrieving detailed information about a user",
                "operationId": "getUser",
                "parameters": [
                    {
                        "description": "Accept header",
                        "in": "header",
                        "name": "Accept",
                        "required": false,
                        "schema": {
                            "enum": [
                                "application/json",
                                "application/xml"
                            ],
                            "type": "string"
                        }
                    },
                    {
                        "description": "Accept-Language header with ISO 639-1 language code\n\n_Default: en_\n",
                        "in": "header",
                        "name": "Accept-Language",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "description": "Attribute that will be used to find the user",
                        "in": "path",
                        "name": "identification_method",
                        "required": true,
                        "schema": {
                            "enum": [
                                "id",
                                "login"
                            ],
                            "example": "login",
                            "type": "string"
                        }
                    },
                    {
                        "description": "The value of the attribute used to find the user, either id or login",
                        "in": "path",
                        "name": "user_identifier",
                        "required": true,
                        "schema": {
                            "example": "guest",
                            "type": "string"
                        }
                    },
                    {
                        "description": "Defines the attribute of the resource that may be returned in result. There can be many of them within a one request URL. If no attribute parameter is defined then all attributes of resource are returned. e.g:\n```\n&attribute=CUSTOM_ATTRIBUTE&attribute=A_DESCRIPTION\n```\n",
                        "explode": true,
                        "in": "query",
                        "name": "attribute",
                        "required": false,
                        "schema": {
                            "items": {
                                "type": "string"
                            },
                            "type": "array"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/GetUser"
                                }
                            },
                            "application/xml": {
                                "examples": {
                                    "xmlExample": {
                                        "$ref": "#/components/examples/GetUserXml"
                                    }
                                },
                                "schema": {
                                    "$ref": "#/components/schemas/GetUser"
                                }
                            }
                        },
                        "description": "JSON or XML response containing information about the user",
                        "links": {
                            "Link_to_delete_the_user": {
                                "description": "Path: `/rest/2.0/users/id/{user_id}`\n|Method|Relation|Position in response|\n|:------:|:------:|:------:|\n|DELETE|self|root|\n",
                                "operationId": "Hateoas Link"
                            },
                            "Link_to_each_role_that_user_has": {
                                "description": "Path: `/rest/2.0/roles/{parent_id}/{role_name}`\n|Method|Relation|Position in response|\n|:------:|:------:|:------:|\n|GET|self|role|\n",
                                "operationId": "Hateoas Link"
                            },
                            "Link_to_each_usergroup_in_which_user_is_registered": {
                                "description": "Path: `/rest/2.0/usergroups/{group_id}`\n|Method|Relation|Position in response|\n|:------:|:------:|:------:|\n|GET|self|usergroup|\n",
                                "operationId": "Hateoas Link"
                            },
                            "Link_to_patch_the_user": {
                                "description": "Path: `/rest/2.0/users/id/{user_id}`\n|Method|Relation|Position in response|\n|:------:|:------:|:------:|\n|PATCH|self|root|\n",
                                "operationId": "Hateoas Link"
                            },
                            "Self_link": {
                                "description": "Path: `/rest/2.0/users/id/{user_id}`\n|Method|Relation|Position in response|\n|:------:|:------:|:------:|\n|GET|self|root|\n",
                                "operationId": "Hateoas Link"
                            }
                        }
                    },
                    "401": {
                        "description": "(Unauthorized Access) Request lacks valid authentication credentials"
                    },
                    "403": {
                        "description": "(Forbidden) No access to that action or no access to passed in body objectgroup"
                    },
                    "404": {
                        "description": "(Not Found) User does not exist"
                    },
                    "500": {
                        "description": "(Internal Server Error) An unexpected server issue was encountered"
                    }
                },
                "summary": "Get user info",
                "tags": [
                    "Users",
                    "Users read APIs"
                ]
            },
            "patch": {
                "description": "Endpoint for updating user attributes",
                "operationId": "updateUser",
                "parameters": [
                    {
                        "description": "Content type of body",
                        "in": "header",
                        "name": "Content-type",
                        "required": true,
                        "schema": {
                            "enum": [
                                "application/json"
                            ],
                            "type": "string"
                        }
                    },
                    {
                        "description": "Accept header",
                        "in": "header",
                        "name": "Accept",
                        "required": false,
                        "schema": {
                            "enum": [
                                "application/json",
                                "application/xml"
                            ],
                            "type": "string"
                        }
                    },
                    {
                        "description": "ISO 639-1 language code\n\n_Default: en_\n",
                        "in": "header",
                        "name": "Content-Language",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "description": "Attribute that will be used to find the user",
                        "in": "path",
                        "name": "identification_method",
                        "required": true,
                        "schema": {
                            "enum": [
                                "id",
                                "login"
                            ],
                            "example": "login",
                            "type": "string"
                        }
                    },
                    {
                        "description": "The value of the attribute used to find the user, either id or login",
                        "in": "path",
                        "name": "user_identifier",
                        "required": true,
                        "schema": {
                            "example": "guest",
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/UpdateUserAttributes"
                            }
                        }
                    },
                    "description": "Possible attribute values:  \n```\nFORENAME, SURNAME, PASSWORD, MUST_CHANGE_PASSWORD, ACCOUNT_DISABLED, TELEPHONE_NUMBER, DESCRIPTION, EMAIL, ROOM, TYPE_OF_OCCUPATION, FORM_OF_ADDRESS, INACTIVE_SINCE, LOGIN_MECHANISM, LDAP_GUID\n```\n"
                },
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/GetUser"
                                }
                            },
                            "application/xml": {
                                "examples": {
                                    "xmlExample": {
                                        "$ref": "#/components/examples/GetUserXml"
                                    }
                                },
                                "schema": {
                                    "$ref": "#/components/schemas/GetUser"
                                }
                            }
                        },
                        "description": "JSON or XML response containing information about the user",
                        "headers": {
                            "Location": {
                                "$ref": "#/components/headers/LocationHeader"
                            }
                        },
                        "links": {
                            "Link_to_delete_the_user": {
                                "description": "Path: `/rest/2.0/users/id/{user_id}`\n|Method|Relation|Position in response|\n|:------:|:------:|:------:|\n|DELETE|self|root|\n",
                                "operationId": "Hateoas Link"
                            },
                            "Link_to_each_role_that_user_has": {
                                "description": "Path: `/rest/2.0/roles/{parent_id}/{role_name}`\n|Method|Relation|Position in response|\n|:------:|:------:|:------:|\n|GET|self|role|\n",
                                "operationId": "Hateoas Link"
                            },
                            "Link_to_each_usergroup_in_which_user_is_registered": {
                                "description": "Path: `/rest/2.0/usergroups/{group_id}`\n|Method|Relation|Position in response|\n|:------:|:------:|:------:|\n|GET|self|usergroup|\n",
                                "operationId": "Hateoas Link"
                            },
                            "Link_to_patch_the_user": {
                                "description": "Path: `/rest/2.0/users/id/{user_id}`\n|Method|Relation|Position in response|\n|:------:|:------:|:------:|\n|PATCH|self|root|\n",
                                "operationId": "Hateoas Link"
                            },
                            "Self_link": {
                                "description": "Path: `/rest/2.0/users/id/{user_id}`\n|Method|Relation|Position in response|\n|:------:|:------:|:------:|\n|GET|self|root|\n",
                                "operationId": "Hateoas Link"
                            }
                        }
                    },
                    "400": {
                        "description": "(Bad Request) Wrong data was passed in request body"
                    },
                    "401": {
                        "description": "(Unauthorized Access) Request lacks valid authentication credentials"
                    },
                    "403": {
                        "description": "(Forbidden) No access to that action or no access to passed in body objectgroup"
                    },
                    "404": {
                        "description": "(Not Found) User does not exist"
                    },
                    "409": {
                        "description": "(Conflict) User has been modified by some other source"
                    },
                    "423": {
                        "description": "(Locked) User is locked by another application"
                    },
                    "500": {
                        "description": "(Internal Server Error) An unexpected server issue was encountered"
                    }
                },
                "summary": "Modify user",
                "tags": [
                    "Users",
                    "Users write APIs"
                ]
            }
        },
        "/rest/2.0/users/{identification_method}/{user_identifier}/repos": {
            "post": {
                "description": "Endpoint for assigning user to a repository",
                "operationId": "assignUserToRepository",
                "parameters": [
                    {
                        "description": "Content type of body",
                        "in": "header",
                        "name": "Content-type",
                        "required": true,
                        "schema": {
                            "enum": [
                                "application/json"
                            ],
                            "type": "string"
                        }
                    },
                    {
                        "description": "Attribute that will be used to find the user",
                        "in": "path",
                        "name": "identification_method",
                        "required": true,
                        "schema": {
                            "enum": [
                                "id",
                                "login"
                            ],
                            "example": "login",
                            "type": "string"
                        }
                    },
                    {
                        "description": "The value of the attribute used to find the user, either id or login",
                        "in": "path",
                        "name": "user_identifier",
                        "required": true,
                        "schema": {
                            "example": "guest",
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/AddUserToRepo"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Successfully assigned user to the repository",
                        "headers": {
                            "Location": {
                                "$ref": "#/components/headers/LocationHeader"
                            }
                        }
                    },
                    "400": {
                        "description": "(Bad Request) Wrong data was passed in request body"
                    },
                    "401": {
                        "description": "(Unauthorized Access) Request lacks valid authentication credentials"
                    },
                    "403": {
                        "description": "(Forbidden) No access to that action or no access to passed in body objectgroup"
                    },
                    "404": {
                        "description": "(Not Found) User or Repository does not exist"
                    },
                    "500": {
                        "description": "(Internal Server Error) An unexpected server issue was encountered"
                    }
                },
                "summary": "Assign user to repository",
                "tags": [
                    "Users",
                    "Users write APIs"
                ]
            }
        },
        "/rest/2.0/users/{identification_method}/{user_identifier}/repos/{repo_id}": {
            "delete": {
                "description": "Endpoint for removing user from repository",
                "operationId": "removeUserFromRepo",
                "parameters": [
                    {
                        "description": "Attribute that will be used to find the user",
                        "in": "path",
                        "name": "identification_method",
                        "required": true,
                        "schema": {
                            "enum": [
                                "id",
                                "login"
                            ],
                            "example": "login",
                            "type": "string"
                        }
                    },
                    {
                        "description": "The value of the attribute used to find the user, either id or login",
                        "in": "path",
                        "name": "user_identifier",
                        "required": true,
                        "schema": {
                            "example": "guest",
                            "type": "string"
                        }
                    },
                    {
                        "description": "UUID of the repository",
                        "in": "path",
                        "name": "repo_id",
                        "required": true,
                        "schema": {
                            "example": "790e48ca-375d-419b-bd3e-56b434424eda",
                            "format": "uuid",
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "Successfully removed user from repository",
                        "headers": {
                            "Location": {
                                "$ref": "#/components/headers/LocationHeader"
                            }
                        }
                    },
                    "401": {
                        "description": "(Unauthorized Access) Request lacks valid authentication credentials"
                    },
                    "403": {
                        "description": "(Forbidden) No access to that action or no access to passed in body objectgroup"
                    },
                    "404": {
                        "description": "(Not Found) User or Repository does not exist"
                    },
                    "423": {
                        "description": "(Locked) User is locked by another application"
                    },
                    "500": {
                        "description": "(Internal Server Error) An unexpected server issue was encountered"
                    }
                },
                "summary": "Remove user from repository",
                "tags": [
                    "Users",
                    "Users write APIs"
                ]
            }
        },
        "/rest/2.0/users/{identification_method}/{user_identifier}/roles": {
            "post": {
                "description": "Endpoint for assigning user to a role",
                "operationId": "assignUserToRole",
                "parameters": [
                    {
                        "description": "Content type of body",
                        "in": "header",
                        "name": "Content-type",
                        "required": true,
                        "schema": {
                            "enum": [
                                "application/json"
                            ],
                            "type": "string"
                        }
                    },
                    {
                        "description": "Attribute that will be used to find the user",
                        "in": "path",
                        "name": "identification_method",
                        "required": true,
                        "schema": {
                            "enum": [
                                "id",
                                "login"
                            ],
                            "example": "login",
                            "type": "string"
                        }
                    },
                    {
                        "description": "The value of the attribute used to find the user, either id or login",
                        "in": "path",
                        "name": "user_identifier",
                        "required": true,
                        "schema": {
                            "example": "guest",
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/Role"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Successfully assigned user to the role",
                        "headers": {
                            "Location": {
                                "$ref": "#/components/headers/LocationHeader"
                            }
                        }
                    },
                    "400": {
                        "description": "(Bad Request) Wrong data was passed in request body"
                    },
                    "401": {
                        "description": "(Unauthorized Access) Request lacks valid authentication credentials"
                    },
                    "403": {
                        "description": "(Forbidden) No access to that action or no access to passed in body objectgroup"
                    },
                    "404": {
                        "description": "(Not Found) User or Role does not exist"
                    },
                    "500": {
                        "description": "(Internal Server Error) An unexpected server issue was encountered"
                    }
                },
                "summary": "Assign user to role",
                "tags": [
                    "Users",
                    "Users write APIs"
                ]
            }
        },
        "/rest/2.0/users/{identification_method}/{user_identifier}/roles/{role_id}/{role_name}": {
            "delete": {
                "description": "Endpoint for removing user from a role",
                "operationId": "removeUserFromRole",
                "parameters": [
                    {
                        "description": "Attribute that will be used to find the user",
                        "in": "path",
                        "name": "identification_method",
                        "required": true,
                        "schema": {
                            "enum": [
                                "id",
                                "login"
                            ],
                            "example": "login",
                            "type": "string"
                        }
                    },
                    {
                        "description": "The value of the attribute used to find the user, either id or login",
                        "in": "path",
                        "name": "user_identifier",
                        "required": true,
                        "schema": {
                            "example": "guest",
                            "type": "string"
                        }
                    },
                    {
                        "description": "UUID of the parent group of the role",
                        "in": "path",
                        "name": "role_id",
                        "required": true,
                        "schema": {
                            "example": "7445346e-2982-4b52-9c4c-2a51e8b62493",
                            "format": "uuid",
                            "type": "string"
                        }
                    },
                    {
                        "description": "Name of the role",
                        "in": "path",
                        "name": "role_name",
                        "required": true,
                        "schema": {
                            "example": "7445346e-2982-4b52-9c4c-2a51e8b62493",
                            "format": "uuid",
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "Successfully removed user from usergroup",
                        "headers": {
                            "Location": {
                                "$ref": "#/components/headers/LocationHeader"
                            }
                        }
                    },
                    "401": {
                        "description": "(Unauthorized Access) Request lacks valid authentication credentials"
                    },
                    "403": {
                        "description": "(Forbidden) No access to that action or no access to passed in body objectgroup"
                    },
                    "404": {
                        "description": "(Not Found) User or Usergroup does not exist"
                    },
                    "423": {
                        "description": "(Locked) User is locked by another application"
                    },
                    "500": {
                        "description": "(Internal Server Error) An unexpected server issue was encountered"
                    }
                },
                "summary": "Remove user from role",
                "tags": [
                    "Users",
                    "Users write APIs"
                ]
            }
        },
        "/rest/2.0/users/{identification_method}/{user_identifier}/shared-repos": {
            "post": {
                "description": "Endpoint for sharing user in a repository",
                "operationId": "shareUserInRepo",
                "parameters": [
                    {
                        "description": "Content type of body",
                        "in": "header",
                        "name": "Content-type",
                        "required": true,
                        "schema": {
                            "enum": [
                                "application/json"
                            ],
                            "type": "string"
                        }
                    },
                    {
                        "description": "Attribute that will be used to find the user",
                        "in": "path",
                        "name": "identification_method",
                        "required": true,
                        "schema": {
                            "enum": [
                                "id",
                                "login"
                            ],
                            "example": "login",
                            "type": "string"
                        }
                    },
                    {
                        "description": "The value of the attribute used to find the user, either id or login",
                        "in": "path",
                        "name": "user_identifier",
                        "required": true,
                        "schema": {
                            "example": "guest",
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/AddUserToRepo"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Successfully shared user in the repository",
                        "headers": {
                            "Location": {
                                "$ref": "#/components/headers/LocationHeader"
                            }
                        }
                    },
                    "400": {
                        "description": "(Bad Request) Wrong data was passed in request body"
                    },
                    "401": {
                        "description": "(Unauthorized Access) Request lacks valid authentication credentials"
                    },
                    "403": {
                        "description": "(Forbidden) No access to that action or no access to passed in body objectgroup"
                    },
                    "404": {
                        "description": "(Not Found) User or Repository does not exist"
                    },
                    "409": {
                        "description": "(Conflict) User is already shared in this repository"
                    },
                    "500": {
                        "description": "(Internal Server Error) An unexpected server issue was encountered"
                    }
                },
                "summary": "Share user in repository",
                "tags": [
                    "Users",
                    "Users write APIs"
                ]
            }
        },
        "/rest/2.0/users/{identification_method}/{user_identifier}/shared-repos/{repo_id}": {
            "delete": {
                "description": "Endpoint for unsharing user in a repository",
                "operationId": "unshareUserInRepo",
                "parameters": [
                    {
                        "description": "Attribute that will be used to find the user",
                        "in": "path",
                        "name": "identification_method",
                        "required": true,
                        "schema": {
                            "enum": [
                                "id",
                                "login"
                            ],
                            "example": "login",
                            "type": "string"
                        }
                    },
                    {
                        "description": "The value of the attribute used to find the user, either id or login",
                        "in": "path",
                        "name": "user_identifier",
                        "required": true,
                        "schema": {
                            "example": "guest",
                            "type": "string"
                        }
                    },
                    {
                        "description": "UUID of the repository",
                        "in": "path",
                        "name": "repo_id",
                        "required": true,
                        "schema": {
                            "example": "790e48ca-375d-419b-bd3e-56b434424eda",
                            "format": "uuid",
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "Successfully unshared user from repository",
                        "headers": {
                            "Location": {
                                "$ref": "#/components/headers/LocationHeader"
                            }
                        }
                    },
                    "401": {
                        "description": "(Unauthorized Access) Request lacks valid authentication credentials"
                    },
                    "403": {
                        "description": "(Forbidden) No access to that action or no access to passed in body objectgroup"
                    },
                    "404": {
                        "description": "(Not Found) User or Repository does not exist"
                    },
                    "423": {
                        "description": "(Locked) User is locked by another application"
                    },
                    "500": {
                        "description": "(Internal Server Error) An unexpected server issue was encountered"
                    }
                },
                "summary": "Unshare user in repository",
                "tags": [
                    "Users",
                    "Users write APIs"
                ]
            }
        },
        "/rest/2.0/users/{identification_method}/{user_identifier}/usergroups": {
            "post": {
                "description": "Endpoint for assigning user to the usergroup",
                "operationId": "addUserToUsergroup",
                "parameters": [
                    {
                        "description": "Content type of body",
                        "in": "header",
                        "name": "Content-type",
                        "required": true,
                        "schema": {
                            "enum": [
                                "application/json"
                            ],
                            "type": "string"
                        }
                    },
                    {
                        "description": "Attribute that will be used to find the user",
                        "in": "path",
                        "name": "identification_method",
                        "required": true,
                        "schema": {
                            "enum": [
                                "id",
                                "login"
                            ],
                            "example": "login",
                            "type": "string"
                        }
                    },
                    {
                        "description": "The value of the attribute used to find the user, either id or login",
                        "in": "path",
                        "name": "user_identifier",
                        "required": true,
                        "schema": {
                            "example": "guest",
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/AddUserToUsergroup"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Successfully assigned user to usergroup",
                        "headers": {
                            "Location": {
                                "$ref": "#/components/headers/LocationHeader"
                            }
                        }
                    },
                    "400": {
                        "description": "(Bad Request) Wrong data was passed in request body"
                    },
                    "401": {
                        "description": "(Unauthorized Access) Request lacks valid authentication credentials"
                    },
                    "403": {
                        "description": "(Forbidden) No access to that action or no access to passed in body objectgroup"
                    },
                    "404": {
                        "description": "(Not Found) User or Usergroup does not exist"
                    },
                    "500": {
                        "description": "(Internal Server Error) An unexpected server issue was encountered"
                    }
                },
                "summary": "Assing user to usergroup",
                "tags": [
                    "Users",
                    "Users write APIs"
                ]
            }
        },
        "/rest/2.0/users/{identification_method}/{user_identifier}/usergroups/{group_id}": {
            "delete": {
                "description": "Endpoint for removing user from usergroup",
                "operationId": "removeUserFromUsergroup",
                "parameters": [
                    {
                        "description": "Attribute that will be used to find the user",
                        "in": "path",
                        "name": "identification_method",
                        "required": true,
                        "schema": {
                            "enum": [
                                "id",
                                "login"
                            ],
                            "example": "login",
                            "type": "string"
                        }
                    },
                    {
                        "description": "The value of the attribute used to find the user, either id or login",
                        "in": "path",
                        "name": "user_identifier",
                        "required": true,
                        "schema": {
                            "example": "guest",
                            "type": "string"
                        }
                    },
                    {
                        "description": "UUID of user group",
                        "in": "path",
                        "name": "group_id",
                        "required": true,
                        "schema": {
                            "example": "3c944389-eb3d-438e-a2d8-7b1c7513144c",
                            "format": "uuid",
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "Successfully removed user from usergroup",
                        "headers": {
                            "Location": {
                                "$ref": "#/components/headers/LocationHeader"
                            }
                        }
                    },
                    "401": {
                        "description": "(Unauthorized Access) Request lacks valid authentication credentials"
                    },
                    "403": {
                        "description": "(Forbidden) No access to that action or no access to passed in body objectgroup"
                    },
                    "404": {
                        "description": "(Not Found) User or Usergroup does not exist"
                    },
                    "409": {
                        "description": "(Conflict) User belongs to only one usergroup"
                    },
                    "423": {
                        "description": "(Locked) User is locked by another application"
                    },
                    "500": {
                        "description": "(Internal Server Error) An unexpected server issue was encountered"
                    }
                },
                "summary": "Remove user from usergroup",
                "tags": [
                    "Users",
                    "Users write APIs"
                ]
            }
        }
    }
}

Swagger-UI configuration options:

import SwaggerUI from "swagger-ui-react"
import "swagger-ui-react/swagger-ui.css"
var data = require('@site/static/open_api/User write APIS.json');

<SwaggerUI spec={data}
           docExpansion = "list"></SwaggerUI>

Describe the bug you're encountering

I configured the swagger-ui-react component in MDX as seen above. This renders the layout perfectly as expected.

However the example value, of the response code 200 of the Endpoint for updating user attributes is inconsistent with the schema. There is some data missing in the examplev value for the "usergroups" property" and for the "attributes" property image image

To reproduce...

Steps to reproduce the behavior:

  1. Go to https://editor.swagger.io/
  2. Paste the Example Swagger/OpenAPI definition as seen above
  3. A window will pop-up "Would you like to convert your JSON into YAML?" -> click YES
  4. Scroll down to image
  5. Go to the Repsonses section, Code 200 example value.
  6. See error: it states usergroups is null. image

    Expected behavior

    When I use Plain old HTML/CSS/JS (Standalone) it renders fine. OR When I use the " Swagger Viewer arjun.swagger-viewer " (in VS-code) it renders fine. And then you get to see the following proper response, where usergroups is not empty, and where admin attributes are not empty image

mathis-m commented 3 years ago

@TomPeirs Thanks for reporting this issue I will have a look at it!

mathis-m commented 3 years ago

@tim-lai @hkosova This is due to unresolved allOf keword.

Breakpoint at: https://github.com/swagger-api/swagger-ui/blob/cc408812fc927e265da158bf68239530740ab4cc/src/core/components/response.jsx#L160-L165 expand as described: http://localhost:3200/?url=https://gist.githubusercontent.com/mathis-m/e4d96e6487859d9d44c27b773055eb0e/raw/96689e567705aee84f2d06bcf01612e12c06b328/ZBUuuCHIwC.txt sampleSchema.properties.user.properties.usergroups.items.allOf: image