-
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.
move packages & add components controller
- Loading branch information
Showing
6 changed files
with
31 additions
and
9 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
src/main/kotlin/no/fintlabs/metamodel/ComponentController.kt
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,21 @@ | ||
package no.fintlabs.metamodel | ||
|
||
import no.fintlabs.metamodel.metadata.MetadataCache | ||
import org.springframework.web.bind.annotation.GetMapping | ||
import org.springframework.web.bind.annotation.RequestMapping | ||
import org.springframework.web.bind.annotation.RestController | ||
|
||
@RestController | ||
@RequestMapping("/components") | ||
class ComponentController(val metadataCache: MetadataCache) { | ||
|
||
@GetMapping | ||
fun getComponents(): Set<String> { | ||
val uniqueDomainPackages = metadataCache.domainPackageCache.keys | ||
.map { "${it.first}.${it.second}" } | ||
.toSet() | ||
|
||
return uniqueDomainPackages | ||
} | ||
|
||
} |
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
6 changes: 3 additions & 3 deletions
6
...in/no/fintlabs/metamodel/MetadataCache.kt → ...tlabs/metamodel/metadata/MetadataCache.kt
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
4 changes: 2 additions & 2 deletions
4
.../fintlabs/metamodel/MetadataController.kt → .../metamodel/metadata/MetadataController.kt
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
2 changes: 1 addition & 1 deletion
2
...s/metamodel/model/FintRelationMetadata.kt → ...el/metadata/model/FintRelationMetadata.kt
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
2 changes: 1 addition & 1 deletion
2
...n/no/fintlabs/metamodel/model/Metadata.kt → ...labs/metamodel/metadata/model/Metadata.kt
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