Skip to content

Commit

Permalink
fix: Exposition path of spring-data-rest APIs (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
ElisKina-dev authored Jan 8, 2025
1 parent 7c7ee7c commit fc3305e
Show file tree
Hide file tree
Showing 5 changed files with 142 additions and 141 deletions.
254 changes: 127 additions & 127 deletions openapi/generated.openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"description" : "the Broker API"
} ],
"paths" : {
"/brokers" : {
"/crud/brokers" : {
"get" : {
"tags" : [ "broker-entity-controller" ],
"description" : "get-broker",
Expand Down Expand Up @@ -105,7 +105,7 @@
}
}
},
"/brokers/search/findByOrgFiscalCode" : {
"/crud/brokers/search/findByOrgFiscalCode" : {
"get" : {
"tags" : [ "broker-search-controller" ],
"operationId" : "executeSearch-broker-get",
Expand Down Expand Up @@ -133,7 +133,7 @@
}
}
},
"/brokers/{id}" : {
"/crud/brokers/{id}" : {
"get" : {
"tags" : [ "broker-entity-controller" ],
"description" : "get-broker",
Expand Down Expand Up @@ -270,7 +270,7 @@
}
}
},
"/organizations" : {
"/crud/organizations" : {
"get" : {
"tags" : [ "organization-entity-controller" ],
"description" : "get-organization",
Expand Down Expand Up @@ -358,7 +358,7 @@
}
}
},
"/organizations/search/findByIpaCode" : {
"/crud/organizations/search/findByIpaCode" : {
"get" : {
"tags" : [ "organization-search-controller" ],
"operationId" : "executeSearch-organization-get",
Expand Down Expand Up @@ -386,7 +386,7 @@
}
}
},
"/organizations/{id}" : {
"/crud/organizations/{id}" : {
"get" : {
"tags" : [ "organization-entity-controller" ],
"description" : "get-organization",
Expand Down Expand Up @@ -523,7 +523,7 @@
}
}
},
"/profile" : {
"/crud/profile" : {
"get" : {
"tags" : [ "profile-controller" ],
"operationId" : "listAllFormsOfMetadata",
Expand All @@ -541,7 +541,7 @@
}
}
},
"/profile/brokers" : {
"/crud/profile/brokers" : {
"get" : {
"tags" : [ "profile-controller" ],
"operationId" : "descriptor",
Expand Down Expand Up @@ -569,7 +569,7 @@
}
}
},
"/profile/organizations" : {
"/crud/profile/organizations" : {
"get" : {
"tags" : [ "profile-controller" ],
"operationId" : "descriptor_1",
Expand Down Expand Up @@ -743,122 +743,6 @@
}
}
},
"EntityModelBroker" : {
"type" : "object",
"properties" : {
"brokerId" : {
"type" : "integer",
"format" : "int64"
},
"organizationId" : {
"type" : "integer",
"format" : "int64"
},
"brokerFiscalCode" : {
"type" : "string"
},
"brokerName" : {
"type" : "string"
},
"pagoPaInteractionModel" : {
"type" : "string",
"enum" : [ "SYNC", "SYNC_ACA", "SYNC$GPDPRELOAD", "SYNC_ACA$GPDPRELOAD", "ASYNC_GPD" ]
},
"stationId" : {
"type" : "string"
},
"broadcastStationId" : {
"type" : "string"
},
"syncKey" : {
"type" : "string",
"format" : "byte"
},
"gpdKey" : {
"type" : "string",
"format" : "byte"
},
"acaKey" : {
"type" : "string",
"format" : "byte"
},
"personalisationFe" : {
"$ref" : "#/components/schemas/PersonalisationFe"
},
"_links" : {
"$ref" : "#/components/schemas/Links"
}
}
},
"PageMetadata" : {
"type" : "object",
"properties" : {
"size" : {
"type" : "integer",
"format" : "int64"
},
"totalElements" : {
"type" : "integer",
"format" : "int64"
},
"totalPages" : {
"type" : "integer",
"format" : "int64"
},
"number" : {
"type" : "integer",
"format" : "int64"
}
}
},
"PagedModelEntityModelBroker" : {
"type" : "object",
"properties" : {
"_embedded" : {
"type" : "object",
"properties" : {
"broker" : {
"type" : "array",
"items" : {
"$ref" : "#/components/schemas/EntityModelBroker"
}
}
}
},
"_links" : {
"$ref" : "#/components/schemas/Links"
},
"page" : {
"$ref" : "#/components/schemas/PageMetadata"
}
}
},
"PersonalisationFe" : {
"type" : "object",
"properties" : {
"headerAssistanceUrl" : {
"type" : "string"
},
"logoFooterImg" : {
"type" : "string"
},
"footerDescText" : {
"type" : "string"
},
"footerPrivacyInfoUrl" : {
"type" : "string"
},
"footerGDPRUrl" : {
"type" : "string"
},
"footerTermsCondUrl" : {
"type" : "string"
},
"footerAccessibilityUrl" : {
"type" : "string"
}
}
},
"EntityModelOrganization" : {
"type" : "object",
"properties" : {
Expand Down Expand Up @@ -972,13 +856,34 @@
}
}
},
"PageMetadata" : {
"type" : "object",
"properties" : {
"size" : {
"type" : "integer",
"format" : "int64"
},
"totalElements" : {
"type" : "integer",
"format" : "int64"
},
"totalPages" : {
"type" : "integer",
"format" : "int64"
},
"number" : {
"type" : "integer",
"format" : "int64"
}
}
},
"PagedModelEntityModelOrganization" : {
"type" : "object",
"properties" : {
"_embedded" : {
"type" : "object",
"properties" : {
"organization" : {
"organizations" : {
"type" : "array",
"items" : {
"$ref" : "#/components/schemas/EntityModelOrganization"
Expand All @@ -994,6 +899,101 @@
}
}
},
"EntityModelBroker" : {
"type" : "object",
"properties" : {
"brokerId" : {
"type" : "integer",
"format" : "int64"
},
"organizationId" : {
"type" : "integer",
"format" : "int64"
},
"brokerFiscalCode" : {
"type" : "string"
},
"brokerName" : {
"type" : "string"
},
"pagoPaInteractionModel" : {
"type" : "string",
"enum" : [ "SYNC", "SYNC_ACA", "SYNC$GPDPRELOAD", "SYNC_ACA$GPDPRELOAD", "ASYNC_GPD" ]
},
"stationId" : {
"type" : "string"
},
"broadcastStationId" : {
"type" : "string"
},
"syncKey" : {
"type" : "string",
"format" : "byte"
},
"gpdKey" : {
"type" : "string",
"format" : "byte"
},
"acaKey" : {
"type" : "string",
"format" : "byte"
},
"personalisationFe" : {
"$ref" : "#/components/schemas/PersonalisationFe"
},
"_links" : {
"$ref" : "#/components/schemas/Links"
}
}
},
"PersonalisationFe" : {
"type" : "object",
"properties" : {
"headerAssistanceUrl" : {
"type" : "string"
},
"logoFooterImg" : {
"type" : "string"
},
"footerDescText" : {
"type" : "string"
},
"footerPrivacyInfoUrl" : {
"type" : "string"
},
"footerGDPRUrl" : {
"type" : "string"
},
"footerTermsCondUrl" : {
"type" : "string"
},
"footerAccessibilityUrl" : {
"type" : "string"
}
}
},
"PagedModelEntityModelBroker" : {
"type" : "object",
"properties" : {
"_embedded" : {
"type" : "object",
"properties" : {
"brokers" : {
"type" : "array",
"items" : {
"$ref" : "#/components/schemas/EntityModelBroker"
}
}
}
},
"_links" : {
"$ref" : "#/components/schemas/Links"
},
"page" : {
"$ref" : "#/components/schemas/PageMetadata"
}
}
},
"BrokerRequestBody" : {
"type" : "object",
"properties" : {
Expand Down Expand Up @@ -1200,4 +1200,4 @@
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import java.util.Optional;

@RepositoryRestResource(collectionResourceRel = "broker", path = "brokers")
@RepositoryRestResource(path = "brokers")
public interface BrokerRepository extends JpaRepository<Broker,Long> {

@Query("select b from broker b join Organization o on b.brokerId = o.brokerId " +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import java.util.Optional;

@RepositoryRestResource(path = "organizations", collectionResourceRel = "organization")
@RepositoryRestResource(path = "organizations")
public interface OrganizationRepository extends JpaRepository<Organization, Long> {

Optional<Organization> findByIpaCode(String ipaCode);
Expand Down
3 changes: 3 additions & 0 deletions src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ spring:
username: "\${ORGANIZATION_DB_USER}"
password: "\${ORGANIZATION_DB_PASSWORD}"
driverClassName: org.postgresql.Driver
data:
rest:
basePath: crud

management:
endpoint:
Expand Down
Loading

0 comments on commit fc3305e

Please sign in to comment.