-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Workaroud for faulty openapi codegen
- Loading branch information
Showing
5 changed files
with
42 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package org.fiware.iam.ccs.model; | ||
|
||
/** | ||
* Manipulated the generated models to avoid bug in openapi generator: | ||
* - When creating a model for collections of objects, the equals/hashcode function are incorrect. | ||
* - Maps are generated using the additionalProperties field, with rather inconvenient access methods | ||
* | ||
* Once this is fixed, the unmanipulated generated models should be used again | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 16 additions & 3 deletions
19
src/main/resources/db/migration/V0_0_1__initial-migration.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,18 @@ | ||
CREATE TABLE IF NOT EXISTS `service` ( | ||
`id` varchar(255) NOT NULL PRIMARY KEY, | ||
`default_oidc_scope` varchar(255) NOT NULL, | ||
`oidc_scopes` LONGTEXT NOT NULL | ||
`id` varchar(255) NOT NULL PRIMARY KEY | ||
); | ||
|
||
CREATE TABLE IF NOT EXISTS `credential` ( | ||
`id` int NOT NULL AUTO_INCREMENT PRIMARY KEY, | ||
`credential_type` varchar(255) NOT NULL, | ||
`service_id` varchar(255) NOT NULL, | ||
CONSTRAINT `fk_service` FOREIGN KEY (`service_id`) REFERENCES `service` (`id`) ON DELETE CASCADE | ||
); | ||
|
||
CREATE TABLE IF NOT EXISTS `endpoint_entry` ( | ||
`id` int NOT NULL AUTO_INCREMENT PRIMARY KEY, | ||
`endpoint` varchar(255) NOT NULL, | ||
`type` varchar(100) NOT NULL, | ||
`credential_id` int NOT NULL, | ||
CONSTRAINT `fk_credential` FOREIGN KEY (`credential_id`) REFERENCES `credential` (`id`) ON DELETE CASCADE | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
DROP TABLE `service` CASCADE; | ||
|
||
CREATE TABLE IF NOT EXISTS `service` ( | ||
`id` varchar(255) NOT NULL PRIMARY KEY, | ||
`default_oidc_scope` varchar(255) NOT NULL, | ||
`oidc_scopes` LONGTEXT NOT NULL | ||
); |