Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix minor bugs related to Organizations #12815

Merged
merged 1 commit into from
Jan 31, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,8 @@ public OrganizationDTO organizationId(String organizationId) {
}


@ApiModelProperty(example = "ece92bdc-e1e6-325c-b6f4-656208a041e9", required = true, value = "UUID of the organization. ")
@ApiModelProperty(example = "ece92bdc-e1e6-325c-b6f4-656208a041e9", value = "UUID of the organization. ")
@JsonProperty("organizationId")
@NotNull
public String getOrganizationId() {
return organizationId;
}
Expand All @@ -54,8 +53,9 @@ public OrganizationDTO externalOrganizationId(String externalOrganizationId) {
}


@ApiModelProperty(example = "ece92bdc-e1e6-325c-b6f4-656208a041e9", value = "External id of the organization. ")
@ApiModelProperty(example = "ece92bdc-e1e6-325c-b6f4-656208a041e9", required = true, value = "External id of the organization. ")
@JsonProperty("externalOrganizationId")
@NotNull
public String getExternalOrganizationId() {
return externalOrganizationId;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,10 @@ public Response organizationsPost(OrganizationDTO organizationDTO, MessageContex
orgId = orgInfo.getOrganizationId();
organizationDTO.setParentOrganizationId(orgId); // set current users organization as parent id if available.
}
if (organizationDTO.getParentOrganizationId() == null) {
throw new APIManagementException("Parent Organization not found",
ExceptionCodes.MISSING_ORGANINATION);
}
OrganizationDetailsDTO orgDto = OrganizationsMappingUtil.toOrganizationDetailsDTO(organizationDTO);
orgDto.setTenantDomain(superOrganization);
orgDto = apiAdmin.addOrganization(orgDto);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4889,7 +4889,7 @@ components:
Organization:
title: Organization
required:
- organizationId
- externalOrganizationId
type: object
properties:
organizationId:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4889,7 +4889,7 @@ components:
Organization:
title: Organization
required:
- organizationId
- externalOrganizationId
type: object
properties:
organizationId:
Expand Down