Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add custom annotation for configuration property and feature flag documentation #2852

Merged
merged 39 commits into from
Nov 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
5459897
feat: add custom annotation for prop documentation
ossdhaval Nov 3, 2022
e1e6b43
feat: add annotation processor
ossdhaval Nov 4, 2022
16087e2
feat: annotate properties
ossdhaval Nov 4, 2022
95a8e96
feat: configure annotation processor
ossdhaval Nov 4, 2022
ff17f3e
feat: add default value
ossdhaval Nov 4, 2022
0a38a73
feat: add annotation to enum
ossdhaval Nov 4, 2022
a7882a0
feat: add comment
ossdhaval Nov 4, 2022
b88e451
feat: rename annotation
ossdhaval Nov 9, 2022
ce9f62d
feat: rename processor class
ossdhaval Nov 9, 2022
e41b092
feat: refactor to new core module
ossdhaval Nov 9, 2022
3d6c26d
feat: fix test class errors
ossdhaval Nov 9, 2022
6c22174
feat: rename the module
ossdhaval Nov 10, 2022
26d6e5d
feat: add table and details view of content
ossdhaval Nov 10, 2022
a2815d9
feat: sort properties
ossdhaval Nov 10, 2022
bb649f7
feat: change wording - mandatory to required
ossdhaval Nov 10, 2022
3f5ff38
feat: add exception handling and logging
ossdhaval Nov 11, 2022
b0f1d9b
feat: write file under classes output dir
ossdhaval Nov 11, 2022
37ea1d9
feat: create output file under target directory
ossdhaval Nov 11, 2022
ff68f2b
feat: rename property and file
ossdhaval Nov 14, 2022
d33c256
feat: create separate annotation for feature flags
ossdhaval Nov 15, 2022
17f57db
feat: code cleanup
ossdhaval Nov 15, 2022
1c432de
fix: add description to properties
ossdhaval Nov 16, 2022
d455f19
fix: add property descriptions from Gluu docs
ossdhaval Nov 16, 2022
3885aac
fix: add descriptions from Swagger
ossdhaval Nov 17, 2022
4b74744
fix(fido2): annotate fido config properties
ossdhaval Nov 17, 2022
fba3013
feat(scim): configure property documentation annotations
ossdhaval Nov 18, 2022
93cacc8
fix: add module name to file and title
ossdhaval Nov 18, 2022
537fb68
fix: add Feature Flag descriptions
ossdhaval Nov 18, 2022
d04317a
fix: integrate doc generation with CI
ossdhaval Nov 22, 2022
33424c2
fix: add tags to generated docs
ossdhaval Nov 22, 2022
b5f245d
fix: create separate sections for properties and flags
ossdhaval Nov 22, 2022
a570f80
Merge branch 'main' into properties-doc-automation
ossdhaval Nov 22, 2022
62e1f10
fix: update the artifact version for jans-doc
ossdhaval Nov 22, 2022
8b5abb9
fix: contents of markdown files after merge
ossdhaval Nov 22, 2022
498c889
ci: remove token req
moabu Nov 22, 2022
bb1d0e4
fix: sonar issues
ossdhaval Nov 23, 2022
94d0703
fix: sonar issues
ossdhaval Nov 23, 2022
9c70e0e
fix: sonar issues
ossdhaval Nov 23, 2022
240ea9c
fix: move doc generation to shell script
ossdhaval Nov 23, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,10 @@ jobs:
cp janssen-*.tgz ../

- name: Generate docs
run: echo "Custom work on generating docs can go here."
run: |
echo "Custom work on generating docs can go here."
chmod u+x automation/docs/generate-property-docs.sh
sudo bash ./automation/docs/generate-property-docs.sh

- name: git config
run: |
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/build-wars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ jobs:
- uses: actions/checkout@v3
with:
repository: ${{ github.repository }}
token: ${{ secrets.githubtoken }}

- name: find changed directories
run: |
Expand Down Expand Up @@ -88,4 +87,4 @@ jobs:
pwd
mvn clean install -DskipTests --file ${{ matrix.fldrpath }}
mvn -B package --file ${{ matrix.fldrpath }}/pom.xml -Dmaven.test.skip=true
mvn --file ${{ matrix.fldrpath }}/pom.xml deploy -Dmaven.test.skip=true
mvn --file ${{ matrix.fldrpath }}/pom.xml deploy -Dmaven.test.skip=true
19 changes: 19 additions & 0 deletions automation/docs/generate-property-docs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash
set -euo pipefail

echo "Generate properties and feature flag documents from elements annotated with @DocFeatureFlag and @DocProperty"

# Compile jans-core to pick-up any changes in annotation processors
mvn -q -f jans-core/pom.xml -DskipTests clean compile install

# Compile modules where classes that use these annotations exist.
# This will generate markdown files under target/classes directory
mvn -q -f jans-auth-server/pom.xml clean compile
mvn -q -f jans-fido2/pom.xml clean compile
mvn -q -f jans-scim/pom.xml clean compile

# Move markdown files to appropriate locations under documentation root 'doc'
mv -f jans-auth-server/model/target/classes/janssenauthserver-properties.md docs/admin/reference/json/properties
mv -f jans-auth-server/model/target/classes/janssenauthserver-feature-flags.md docs/admin/reference/json/feature-flags
mv -f jans-fido2/model/target/classes/fido2-properties.md docs/admin/reference/json/properties
mv -f jans-scim/model/target/classes/scim-properties.md docs/admin/reference/json/properties
9 changes: 0 additions & 9 deletions docs/admin/reference/json/config-api.md

This file was deleted.

6 changes: 6 additions & 0 deletions docs/admin/reference/json/feature-flags/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Overview

Please use the left navigation menu to browse the content of this section while we are still working on developing content for `Overview` page.

!!! Contribute
If you’d like to contribute to this document, get started with the [Contribution Guide](https://docs.jans.io/head/CONTRIBUTING/#contributing-to-the-documentation)
Original file line number Diff line number Diff line change
@@ -0,0 +1,214 @@
---
tags:
- administration
- reference
- json
- feature-flags
---

# Janssen Auth Server Feature Flags

| Feature Flag Name | Description | |
|-----|-----|-----|
| ACTIVE_SESSION | Enable/Disable active session endpoint | [Details](#active_session) |
| CIBA | Enable/Disable OpenID Connect Client Initiated Backchannel Authentication Flow(CIBA) flow support | [Details](#ciba) |
| CLIENTINFO | Enable/Disable client info endpoint | [Details](#clientinfo) |
| DEVICE_AUTHZ | Enable/Disable support for device authorization | [Details](#device_authz) |
| END_SESSION | Enable/Disable end session endpoint | [Details](#end_session) |
| HEALTH_CHECK | Enable/Disable health-check endpoint | [Details](#health_check) |
| ID_GENERATION | Enable/Disable ID Generation endpoint | [Details](#id_generation) |
| INTROSPECTION | Enable/Disable token introspection endpoint | [Details](#introspection) |
| JANS_CONFIGURATION | Enable/Disable *.well-known* configuration endpoint | [Details](#jans_configuration) |
| METRIC | Enable/Disable metric reporter feature | [Details](#metric) |
| PAR | Enable/Disable Pushed Authorization Requests(PAR) feature | [Details](#par) |
| REGISTRATION | Enable/Disable client registration endpoint | [Details](#registration) |
| REVOKE_SESSION | Enable/Disable session revocation endpoint | [Details](#revoke_session) |
| REVOKE_TOKEN | Enable/Disable token revocation endpoint | [Details](#revoke_token) |
| SSA | Enable/Disable Software Statement Assertion(SSA) feature | [Details](#ssa) |
| STAT | Enable/Disable Stat service | [Details](#stat) |
| STATUS_SESSION | Enable/Disable session status check endpoint | [Details](#status_session) |
| U2F | Enable/Disable support for Universal 2nd Factor(U2F) protocol | [Details](#u2f) |
| UMA | Enable/Disable support for User-Managed Access (UMA) | [Details](#uma) |
| USERINFO | Enable/Disable OpenID Connect [userinfo endpoint](https://openid.net/specs/openid-connect-core-1_0.html#UserInfo) | [Details](#userinfo) |


### ACTIVE_SESSION

- Description: Enable/Disable active session endpoint

- Required: No

- Default value: None


### CIBA

- Description: Enable/Disable OpenID Connect Client Initiated Backchannel Authentication Flow(CIBA) flow support

- Required: No

- Default value: None


### CLIENTINFO

- Description: Enable/Disable client info endpoint

- Required: No

- Default value: None


### DEVICE_AUTHZ

- Description: Enable/Disable support for device authorization

- Required: No

- Default value: None


### END_SESSION

- Description: Enable/Disable end session endpoint

- Required: No

- Default value: None


### HEALTH_CHECK

- Description: Enable/Disable health-check endpoint

- Required: No

- Default value: None


### ID_GENERATION

- Description: Enable/Disable ID Generation endpoint

- Required: No

- Default value: None


### INTROSPECTION

- Description: Enable/Disable token introspection endpoint

- Required: No

- Default value: None


### JANS_CONFIGURATION

- Description: Enable/Disable *.well-known* configuration endpoint

- Required: No

- Default value: None


### METRIC

- Description: Enable/Disable metric reporter feature

- Required: No

- Default value: None


### PAR

- Description: Enable/Disable Pushed Authorization Requests(PAR) feature

- Required: No

- Default value: None


### REGISTRATION

- Description: Enable/Disable client registration endpoint

- Required: No

- Default value: None


### REVOKE_SESSION

- Description: Enable/Disable session revocation endpoint

- Required: No

- Default value: None


### REVOKE_TOKEN

- Description: Enable/Disable token revocation endpoint

- Required: No

- Default value: None


### SSA

- Description: Enable/Disable Software Statement Assertion(SSA) feature

- Required: No

- Default value: None


### STAT

- Description: Enable/Disable Stat service

- Required: No

- Default value: None


### STATUS_SESSION

- Description: Enable/Disable session status check endpoint

- Required: No

- Default value: None


### U2F

- Description: Enable/Disable support for Universal 2nd Factor(U2F) protocol

- Required: No

- Default value: None


### UMA

- Description: Enable/Disable support for User-Managed Access (UMA)

- Required: No

- Default value: None


### USERINFO

- Description: Enable/Disable OpenID Connect [userinfo endpoint](https://openid.net/specs/openid-connect-core-1_0.html#UserInfo)

- Required: No

- Default value: None


6 changes: 6 additions & 0 deletions docs/admin/reference/json/properties/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Overview

Please use the left navigation menu to browse the content of this section while we are still working on developing content for `Overview` page.

!!! Contribute
If you’d like to contribute to this document, get started with the [Contribution Guide](https://docs.jans.io/head/CONTRIBUTING/#contributing-to-the-documentation)
6 changes: 6 additions & 0 deletions docs/admin/reference/json/properties/config-api-properties.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Overview

Please use the left navigation menu to browse the content of this section while we are still working on developing content for `Overview` page.

!!! Contribute
If you’d like to contribute to this document, get started with the [Contribution Guide](https://docs.jans.io/head/CONTRIBUTING/#contributing-to-the-documentation)
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
tags:
- administration
- reference
- json
- properties
- administration
- reference
- json
- properties
---

# Fido2 Configuration Properties
Expand Down Expand Up @@ -252,5 +252,3 @@ tags:
- Default value: None




Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
tags:
- administration
- reference
- json
- properties
- administration
- reference
- json
- properties
---

# jans-auth-server Configuration Properties
# Janssen Auth Server Configuration Properties

| Property Name | Description | |
|-----|-----|-----|
Expand Down Expand Up @@ -2532,6 +2532,3 @@ tags:
- Default value: None





Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
tags:
- administration
- reference
- json
- properties
- administration
- reference
- json
- properties
---

# SCIM Configuration Properties
Expand Down Expand Up @@ -192,5 +192,3 @@ tags:
- Default value: None




5 changes: 5 additions & 0 deletions jans-auth-server/model/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,11 @@
<groupId>com.wordnik</groupId>
<artifactId>swagger-annotations</artifactId>
</dependency>
<dependency>
<groupId>io.jans</groupId>
<artifactId>jans-doc</artifactId>
<version>${jans-core.version}</version>
</dependency>

</dependencies>
</project>
Loading