swagger-api / swagger-api/swagger-ui
Swagger-ui-react + editor.swagger.io missing data in example value response
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 29k
- Forks
- 9.3k
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 25
Description
Q&A (please complete the following information)
- OS: Windows 10 Home edition
- Browser: Google Chrome
- Version: [Version 89.0.4389.114 (Official Build) (32-bit)
- Method of installation: npm i swagger-ui-react
- Swagger-UI version: 3.46.0
- Swagger/OpenAPI version: version: 2.0.0 openapi: 3.0.2
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"
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No repository file or test is named. Start by reproducing the missing-data behavior in Swagger UI React 3.46.0 with the OpenAPI definition included in the issue, then compare the rendered example value with the source XML example. Done when the example response displays the expected data consistently and the behavior is covered by a regression test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, openapi, react
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100