Skip to content

Commit

Permalink
chore: update readme (#78)
Browse files Browse the repository at this point in the history
  • Loading branch information
hegeaal authored Apr 11, 2024
1 parent 18a30c0 commit b9ced44
Showing 1 changed file with 90 additions and 1 deletion.
91 changes: 90 additions & 1 deletion README.md
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"
}
]
```

0 comments on commit b9ced44

Please sign in to comment.