Skip to content

Commit 6b7443b

Browse files
committed
README.md updates
1 parent 4485c8e commit 6b7443b

File tree

2 files changed

+26
-4
lines changed

2 files changed

+26
-4
lines changed

.github/workflows/maven-publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created
22
# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#apache-maven-with-a-settings-path
33

4-
name: Maven Package
4+
name: Publish OpenAPI specification yaml files
55

66
on:
77
release:

README.md

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
# CDOC2 OpenAPI
22

3-
Contains OpenAPI specifications.
3+
Contains OpenAPI specifications for [CDOC2 project](https://open-eid.github.io/CDOC2)
44

55
## Java
66

7-
Openapi specification maven artifacts can be installed (local `~/.m2` directory) or deployed
7+
Openapi specification maven artifacts (`packaging=yaml`) can be installed (local `~/.m2` directory) or deployed
88
(remote maven package repository) with standard `mvn install` or `mvn deploy` commands.
99

10+
`mvn install` will parse `info.version` from `*-openapi.yaml` and use that as maven package version.
11+
1012
### Get from GitHub package repo
1113

1214
Configure github package repo access
@@ -34,7 +36,17 @@ can be found in maven package repository:
3436

3537
https://github.com/open-eid/cdoc2-openapi/packages
3638

37-
## Releasing/Publishing OpenApi specification
39+
## Releasing/Publishing OpenApi using GitHub actions
40+
41+
Push a new version of *-openapi.yaml to GitHub.
42+
43+
Create GitHub Release
44+
https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository#creating-a-release
45+
46+
That will trigger `.github/workflows/maven-publish.yml` that will call `mvn deploy` with correct parameters
47+
48+
49+
## Releasing/Publishing OpenApi specification manually
3850

3951
Deploy/publish OpenApi manually:
4052
`mvn -Dproject.distributionManagement.repository.id=github -Dproject.distributionManagement.repository.url=https://maven.pkg.github.com/open-eid/cdoc2-openapi deploy`
@@ -56,6 +68,16 @@ mvn deploy:deploy-file \
5668
```
5769
Refer: https://maven.apache.org/plugins/maven-deploy-plugin/deploy-file-mojo.html
5870

71+
## Delete OpenApi package from local Maven repository
72+
```
73+
mvn dependency:purge-local-repository -DmanualInclude=ee.cyber.cdoc2.openapi:cdoc2-key-capsules-openapi
74+
```
75+
76+
## Usage from Java Maven projects for code generation
77+
78+
See:
79+
* https://github.com/open-eid/cdoc2-java-ref-impl/blob/master/cdoc2-client/pom.xml
80+
* https://github.com/open-eid/cdoc2-capsule-server/blob/master/cdoc2-server-openapi/pom.xml
5981

6082

6183

0 commit comments

Comments
 (0)