-
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.
- Loading branch information
Showing
1 changed file
with
90 additions
and
1 deletion.
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 |
---|---|---|
@@ -1 +1,90 @@ | ||
# catalog-admin-service | ||
# catalog-admin-service | ||
|
||
This service is responsible for settings in registration catalogs. This includes code lists, internal fields, editable fields for concepts, and settings across different catalogs including design and responsible users. | ||
|
||
This is a REST API. The Open-API spec can be found [here](https://raw.githubusercontent.com/Informasjonsforvaltning/catalog-admin-service/main/openapi.yaml). | ||
|
||
## Requirements | ||
- maven | ||
- java 21 | ||
- docker | ||
- docker-compose | ||
|
||
## Run tests | ||
``` | ||
mvn test | ||
``` | ||
|
||
## Run locally | ||
|
||
### Start catalog admin service | ||
Start catalog admin service locally using maven. Use Spring profile **develop**. | ||
``` | ||
mvn spring-boot:run -Dspring-boot.run.profiles=develop | ||
``` | ||
|
||
|
||
## Usage examples | ||
NB! Remember to use correct catalogId. | ||
|
||
### Example: create code list | ||
|
||
Method: POST | ||
|
||
URL: https://catalog-admin.staging.fellesdatakatalog.digdir.no/api/code-lists/[catalogId] | ||
|
||
Payload: | ||
``` | ||
{ | ||
"codeList": { | ||
"id": "", | ||
"catalogId": [catalogId], | ||
"name": "Oppretter kodeliste", | ||
"description": "Beskrivelse", | ||
"codes": [ | ||
{ | ||
"id": "2eecd911-580b-47b9-b305-532ca68d29ca", | ||
"name": { | ||
"nb": "Ny kode 1", | ||
"nn": "", | ||
"en": "" | ||
}, | ||
"parentID": null | ||
}, | ||
{ | ||
"id": "9ddcf0b1-dafb-4a34-89be-b9c50343023c", | ||
"name": { | ||
"nb": "Ny kode 2", | ||
"nn": "", | ||
"en": "" | ||
}, | ||
"parentID": null | ||
} | ||
] | ||
} | ||
} | ||
``` | ||
|
||
### Example: Update design | ||
|
||
URL: https://catalog-admin.staging.fellesdatakatalog.digdir.no/api/design/[catalogId]/design | ||
|
||
Method: PATCH | ||
|
||
Payload: | ||
|
||
``` | ||
[ | ||
{ | ||
"op": "replace", | ||
"path": "/logoDescription", | ||
"value": "qt-dawg" | ||
}, | ||
{ | ||
"op": "replace", | ||
"path": "/backgroundColor", | ||
"value": "#8087ff" | ||
} | ||
] | ||
``` |