Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lblod/reglement-publish-service
https://github.com/lblod/reglement-publish-service
Last synced: 22 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/lblod/reglement-publish-service
- Owner: lblod
- Created: 2022-08-25T10:59:02.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-07-16T09:30:19.000Z (5 months ago)
- Last Synced: 2024-07-16T12:04:50.164Z (5 months ago)
- Language: JavaScript
- Size: 376 KB
- Stars: 0
- Watchers: 8
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# reglement-publish-service
This service can be used to publish regulatory attachments## Endpoints
It provides 5 endpoints## `POST` /publish/regulatory-attachment/:uuid
A taskified enpoint which publishes the regulatory attachment with the provided uuid, the published info will have the following structure:
```
$reglementUri ext:publishedVersion ?publishedContainer.
?publishedContainer ext:currentVersion ?currentVersion.
?currentVersion a ext:PublishedRegulatoryAttachment;
ext:content ?file;
pav:createdOn ?date;
pav:lastUpdateOn ?date;
pav:previousVersion ?previousVersion;
ext:container ?publishedContainer.
```
Being ?file the rdfa structure of a file per the file-service documentation## /publication-tasks/:id
This endpoint checks the state of a task created by the previous endpoint## /preview/regulatory-attachment/:uuid
Previews a published regulatory attachment, it just returns a json with the content of said regulatory attachment## /preview/regulatory-attachment-container/:uuid
Previews a regulatory attachment container## /invalidate/regulatory-attachment/:uuid
Invalidates the specified regulatory attachment, it just adds a `schema:validThrough` property with todays date to indicate that the publication is no longer valid## Docker Compose Example
```
publisher:
image: lblod/reglement-publish-service:0.0.1
links:
- database:database
volumes:
- ./data/files/:/share/
```## Development
### Making a release
- make sure all relevant PRs have the appropriate labels according to [lerna-changelog](https://github.com/lerna/lerna-changelog#usage).
- `npm run release`
- check the changelog and follow the prompts. Say yes to tagging and creating a github release.