Skip to content

Commit

Permalink
fix(config-api): json build issue and saml plugin swagger spec annota…
Browse files Browse the repository at this point in the history
…tion (#6582)

* fix(config-api): source LDAP server test

* feat(config-api): pom changes for org json

Signed-off-by: pujavs <pujas.works@gmail.com>

* fix(config-api): sync with main

Signed-off-by: pujavs <pujas.works@gmail.com>

* docs(config-api): issue 6382 - regen spec to reflect new fields in ClientAttributes

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): json dependency changes

Signed-off-by: pujavs <pujas.works@gmail.com>

* fix(config-api): json build issue and saml plugin swagger spec annotation

Signed-off-by: pujavs <pujas.works@gmail.com>

---------

Signed-off-by: pujavs <pujas.works@gmail.com>
Signed-off-by: Mustafa Baser <mbaser@mail.com>
  • Loading branch information
pujavs authored and devrimyatar committed Dec 30, 2023
1 parent 7c9822d commit 27bcad3
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 18 deletions.
14 changes: 7 additions & 7 deletions jans-config-api/docs/jans-config-api-swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7586,12 +7586,10 @@ components:
$ref: '#/components/schemas/AttributeValidation'
tooltip:
type: string
whitePagesCanView:
adminCanView:
type: boolean
adminCanEdit:
type: boolean
adminCanView:
type: boolean
userCanView:
type: boolean
userCanEdit:
Expand All @@ -7600,6 +7598,8 @@ components:
type: boolean
userCanAccess:
type: boolean
whitePagesCanView:
type: boolean
baseDn:
type: string
PatchRequest:
Expand Down Expand Up @@ -9002,8 +9002,6 @@ components:
ttl:
type: integer
format: int32
displayName:
type: string
authenticationMethod:
type: string
enum:
Expand All @@ -9015,6 +9013,8 @@ components:
- tls_client_auth
- self_signed_tls_client_auth
- none
displayName:
type: string
baseDn:
type: string
inum:
Expand Down Expand Up @@ -9376,14 +9376,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
11 changes: 6 additions & 5 deletions jans-config-api/plugins/docs/saml-plugin-swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,9 @@ paths:
requestBody:
description: Trust Relationship object
content:
application/json:
multipart/form-data:
schema:
$ref: '#/components/schemas/TrustRelationship'
$ref: '#/components/schemas/TrustRelationshipForm'
examples:
Request example:
description: Request example
Expand All @@ -158,9 +158,9 @@ paths:
"201":
description: Newly created Trust Relationship
content:
multipart/form-data:
application/json:
schema:
$ref: '#/components/schemas/TrustRelationshipForm'
$ref: '#/components/schemas/TrustRelationship'
"401":
description: Unauthorized
"500":
Expand Down Expand Up @@ -445,7 +445,8 @@ components:
trustRelationship:
$ref: '#/components/schemas/TrustRelationship'
metaDataFile:
type: object
type: string
format: binary
securitySchemes:
oauth2:
type: oauth2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import org.jboss.resteasy.annotations.providers.multipart.PartType;
import jakarta.ws.rs.FormParam;
import jakarta.ws.rs.core.MediaType;
import io.swagger.v3.oas.annotations.media.Schema;

public class TrustRelationshipForm implements Serializable {

Expand All @@ -33,6 +34,7 @@ public class TrustRelationshipForm implements Serializable {
@NotNull
@FormParam("metaDataFile")
@PartType(MediaType.APPLICATION_OCTET_STREAM)
@Schema(implementation = String.class, format="binary")
private transient InputStream metaDataFile;

public TrustRelationship getTrustRelationship() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ public Response getTrustRelationshipById(
@Operation(summary = "Create Trust Relationship with Metadata File", description = "Create Trust Relationship with Metadata File", operationId = "post-trust-relationship-metadata-file", tags = {
"SAML - Trust Relationship" }, security = @SecurityRequirement(name = "oauth2", scopes = {
Constants.SAML_WRITE_ACCESS }))
@RequestBody(description = "Trust Relationship object", content = @Content(mediaType = MediaType.APPLICATION_JSON, schema = @Schema(implementation = TrustRelationship.class), examples = @ExampleObject(name = "Request example", value = "example/trust-relationship/trust-relationship-post.json")))
@RequestBody(description = "Trust Relationship object", content = @Content(mediaType = MediaType.MULTIPART_FORM_DATA, schema = @Schema(implementation = TrustRelationshipForm.class), examples = @ExampleObject(name = "Request example", value = "example/trust-relationship/trust-relationship-post.json")))
@ApiResponses(value = {
@ApiResponse(responseCode = "201", description = "Newly created Trust Relationship", content = @Content(mediaType = MediaType.MULTIPART_FORM_DATA, schema = @Schema(implementation = TrustRelationshipForm.class))),
@ApiResponse(responseCode = "201", description = "Newly created Trust Relationship", content = @Content(mediaType = MediaType.APPLICATION_JSON, schema = @Schema(implementation = TrustRelationship.class))),
@ApiResponse(responseCode = "401", description = "Unauthorized"),
@ApiResponse(responseCode = "500", description = "InternalServerError") })
@Consumes(MediaType.MULTIPART_FORM_DATA)
Expand Down
4 changes: 0 additions & 4 deletions jans-config-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -390,10 +390,6 @@
<artifactId>commons-collections4</artifactId>
<version>4.1</version>
</dependency>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
</dependency>

<!-- apache james -->
<dependency>
Expand Down

0 comments on commit 27bcad3

Please sign in to comment.