Skip to content

Commit

Permalink
feat(jans-config-api): exposed attributes at root value
Browse files Browse the repository at this point in the history
  • Loading branch information
pujavs committed May 17, 2022
1 parent 5b3f0a1 commit 40570a7
Show file tree
Hide file tree
Showing 4 changed files with 180 additions and 106 deletions.
28 changes: 20 additions & 8 deletions jans-config-api/docs/jans-config-api-swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2448,7 +2448,7 @@ paths:
title: Users.
description: List of users.
items:
$ref: '#/components/schemas/User'
$ref: '#/components/schemas/CustomUser'
'401':
$ref: '#/components/responses/Unauthorized'
'500':
Expand Down Expand Up @@ -2500,15 +2500,15 @@ paths:
schema:
title: User Details.
description: User Details.
$ref: '#/components/schemas/User'
$ref: '#/components/schemas/CustomUser'
responses:
'201':
description: Created
content:
application/json:
schema:
title: User Details.
$ref: '#/components/schemas/User'
$ref: '#/components/schemas/CustomUser'
'401':
$ref: '#/components/responses/Unauthorized'
'500':
Expand All @@ -2526,15 +2526,15 @@ paths:
application/json:
schema:
title: User Details.
$ref: '#/components/schemas/User'
$ref: '#/components/schemas/CustomUser'
responses:
'200':
description: OK
content:
application/json:
schema:
title: User Details.
$ref: '#/components/schemas/User'
$ref: '#/components/schemas/CustomUser'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
Expand Down Expand Up @@ -2563,7 +2563,7 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/User'
$ref: '#/components/schemas/CustomUser'
'401':
$ref: '#/components/responses/Unauthorized'
'500':
Expand Down Expand Up @@ -2608,7 +2608,7 @@ paths:
application/json:
schema:
title: User Details.
$ref: '#/components/schemas/User'
$ref: '#/components/schemas/CustomUser'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
Expand Down Expand Up @@ -6687,7 +6687,7 @@ components:
$ref: '#/components/schemas/FacterData'
description: Underlying Server stats

User:
CustomUser:
title: User object
description: User.
type: object
Expand Down Expand Up @@ -6724,6 +6724,18 @@ components:
type: array
items:
$ref: '#/components/schemas/CustomAttribute'
mail:
type: string
description: User mail
displayName:
type: string
description: Name of the user suitable for display to end-users
givenName:
type: string
description: User given Name
userPassword:
type: string
description: User password

UserPatchRequest:
title: User Patch Request object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

import io.jans.orm.model.base.CustomObjectAttribute;

import java.util.List;
import io.jans.as.common.model.common.User;

@JsonIgnoreProperties(ignoreUnknown = true)
public class User extends io.jans.as.common.model.common.User {
public class CustomUser extends User {

private static final long serialVersionUID = 1L;

Expand Down Expand Up @@ -49,9 +47,8 @@ public void setUserPassword(String userPassword) {
}
@Override
public String toString() {
return "User [mail=" + mail + ", displayName=" + displayName + ", jansStatus=" + jansStatus + ", givenName="
return "CustomUser [mail=" + mail + ", displayName=" + displayName + ", jansStatus=" + jansStatus + ", givenName="
+ givenName + ", userPassword= XXXXX ]";
}


}
Loading

0 comments on commit 40570a7

Please sign in to comment.