Skip to content

Commit

Permalink
fix(config-api): asset service param decleration (#9191)
Browse files Browse the repository at this point in the history
Signed-off-by: pujavs <pujas.works@gmail.com>
Former-commit-id: 9ebdaae
  • Loading branch information
pujavs authored Aug 14, 2024
1 parent f3db1d6 commit dcc1219
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ private ApiConstants() {}
public static final String SERVICES = "/services";
public static final String ASSET_TYPE = "/asset-type";
public static final String SERVICE = "/service";

public static final String APP_VERSION = "/app-version";
public static final String SERVER_STAT = "/server-stat";
public static final String USERNAME_PATH = "/{username}";
Expand Down Expand Up @@ -127,6 +127,7 @@ private ApiConstants() {}
public static final String SESSIONID = "sessionId";
public static final String USERDN = "userDn";
public static final String PLUGIN_NAME = "pluginName";
public static final String SERVICE_NAME = "service-name";


public static final String ALL = "all";
Expand Down
31 changes: 19 additions & 12 deletions jans-config-api/docs/jans-config-api-swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -805,6 +805,13 @@ paths:
summary: Load assets on server for a service
description: Load assets on server for a service
operationId: load-service-asset
parameters:
- name: service-name
in: path
description: Service Name
required: true
schema:
type: string
requestBody:
description: String multipart form.
content:
Expand Down Expand Up @@ -8359,21 +8366,21 @@ components:
$ref: '#/components/schemas/AttributeValidation'
tooltip:
type: string
selected:
userCanView:
type: boolean
whitePagesCanView:
userCanEdit:
type: boolean
adminCanView:
type: boolean
adminCanEdit:
type: boolean
userCanView:
type: boolean
userCanEdit:
adminCanAccess:
type: boolean
userCanAccess:
type: boolean
adminCanAccess:
selected:
type: boolean
whitePagesCanView:
type: boolean
baseDn:
type: string
Expand Down Expand Up @@ -9210,6 +9217,8 @@ components:
type: boolean
lockMessageConfig:
$ref: '#/components/schemas/LockMessageConfig'
fapi:
type: boolean
allResponseTypesSupported:
uniqueItems: true
type: array
Expand All @@ -9219,8 +9228,6 @@ components:
- code
- token
- id_token
fapi:
type: boolean
AuthenticationFilter:
required:
- baseDn
Expand Down Expand Up @@ -9987,10 +9994,10 @@ components:
type: array
items:
type: object
value:
type: object
displayValue:
type: string
value:
type: object
LocalizedString:
type: object
properties:
Expand Down Expand Up @@ -10345,14 +10352,14 @@ components:
type: boolean
internal:
type: boolean
locationPath:
type: string
locationType:
type: string
enum:
- ldap
- db
- file
locationPath:
type: string
baseDn:
type: string
ScriptError:
Expand Down
4 changes: 2 additions & 2 deletions jans-config-api/plugins/docs/user-mgt-plugin-swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -863,10 +863,10 @@ components:
type: array
items:
type: object
value:
type: object
displayValue:
type: string
value:
type: object
CustomUser:
type: object
properties:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -339,15 +339,17 @@ public Response updateAsset(@MultipartForm AssetForm assetForm) throws Exception
@POST
@Path(ApiConstants.SERVICE + ApiConstants.SERVICE_NAME_PARAM_PATH)
@ProtectedApi(scopes = { ApiAccessConstants.JANS_ASSET_WRITE_ACCESS })
public Response loadServiceAsset(String serviceName) throws Exception {
public Response loadServiceAsset(
@Parameter(description = "Service Name") @PathParam(ApiConstants.SERVICE_NAME) @NotNull String serviceName)
throws Exception {
if (log.isInfoEnabled()) {
log.info("Create Asset details serviceName:{}", serviceName);
}

// validation
// validation
checkResourceNotNull(serviceName, "Service Name");
String result = null;
// save asset
// save asset
try {
result = assetService.loadServiceAsset(serviceName);

Expand Down

0 comments on commit dcc1219

Please sign in to comment.