Skip to content

Commit ccbe6fd

Browse files
zeevmoneyclaudeCopilot
authored
Fix Javadoc errors and add CI validation (#36)
* Fix Javadoc errors and add CI validation - Fix malformed HTML in GroupCreate.java and GroupRead.java by wrapping <resource_key:resource_instance_key> with {@code ...} - Add javadoc.yaml workflow to validate Javadoc on PRs and master pushes - Update publish.yaml to verify Javadoc before publishing Fixes PER-13670 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Update src/main/java/io/permit/sdk/openapi/models/GroupCreate.java Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update src/main/java/io/permit/sdk/openapi/models/GroupRead.java Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * wip * Exclude generated OpenAPI models from javadoc - Add javadoc task exclusion for io/permit/sdk/openapi/models/** - Mark folder as linguist-generated in .gitattributes for GitHub This reduces javadoc warnings from 100+ to 1 and collapses generated code diffs in GitHub PRs. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Revert javadoc fixes in generated files The generated OpenAPI models are now excluded from javadoc generation in build.gradle, so we don't need to fix the javadoc in these files. This keeps the generated files closer to their original state. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * wip * Update .github/workflows/javadoc.yaml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Add missing @param description in ElementsLoginResult Fixes the last remaining Javadoc warning. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 7d5ac47 commit ccbe6fd

File tree

5 files changed

+60
-8
lines changed

5 files changed

+60
-8
lines changed

.gitattributes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,6 @@
44
# These are explicitly windows files and should use crlf
55
*.bat text eol=crlf
66

7+
# Mark generated OpenAPI models as generated code
8+
# This collapses diffs in PRs and excludes from language statistics
9+
src/main/java/io/permit/sdk/openapi/models/** linguist-generated=true

.github/workflows/javadoc.yaml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Javadoc Verification
2+
3+
on:
4+
pull_request:
5+
branches: [ master ]
6+
push:
7+
branches: [ master ]
8+
9+
jobs:
10+
javadoc:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- uses: actions/setup-java@v3.11.0
15+
with:
16+
java-version: '8'
17+
distribution: 'corretto'
18+
- name: Validate Gradle wrapper
19+
uses: gradle/wrapper-validation-action@v1
20+
- name: Generate Javadoc
21+
uses: gradle/gradle-build-action@v2
22+
with:
23+
arguments: javadoc
24+
- name: Check Javadoc generation
25+
run: |
26+
if [ -d "build/docs/javadoc" ]; then
27+
echo "Javadoc generated successfully"
28+
echo "Javadoc files:"
29+
find build/docs/javadoc -name "*.html" | head -20
30+
else
31+
echo "ERROR: Javadoc directory not found"
32+
exit 1
33+
fi

.github/workflows/publish.yaml

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
name: Publish package to GitHub Packages
22
on:
33
release:
4-
types: [created]
4+
types: [ created ]
55
workflow_dispatch:
6-
6+
77
jobs:
88
publish:
9-
runs-on: ubuntu-latest
10-
permissions:
9+
runs-on: ubuntu-latest
10+
permissions:
1111
contents: read
12-
packages: write
12+
packages: write
1313
steps:
1414
- uses: actions/checkout@v2
1515
- uses: actions/setup-java@v3.11.0
@@ -18,6 +18,18 @@ jobs:
1818
distribution: 'corretto'
1919
- name: Validate Gradle wrapper
2020
uses: gradle/wrapper-validation-action@v1
21+
- name: Verify Javadoc generation
22+
uses: gradle/gradle-build-action@v2
23+
with:
24+
arguments: javadoc
25+
- name: Check Javadoc generation
26+
run: |
27+
if [ -d "build/docs/javadoc" ]; then
28+
echo "Javadoc verified successfully"
29+
else
30+
echo "ERROR: Javadoc directory not found"
31+
exit 1
32+
fi
2133
- name: Publish package
2234
uses: gradle/gradle-build-action@v2
2335
with:
@@ -29,4 +41,4 @@ jobs:
2941
GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }}
3042
GPG_SIGNING_PASSPHRASE: ${{ secrets.GPG_SIGNING_PASSPHRASE }}
3143
NEXUS_TOKEN_USERNAME: ${{ secrets.NEXUS_TOKEN_USERNAME }}
32-
NEXUS_TOKEN_PASSWORD: ${{ secrets.NEXUS_TOKEN_PASSWORD }}
44+
NEXUS_TOKEN_PASSWORD: ${{ secrets.NEXUS_TOKEN_PASSWORD }}

build.gradle

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,11 @@ tasks.named('test') {
225225
useJUnitPlatform()
226226
}
227227

228+
tasks.named('javadoc') {
229+
// Exclude generated OpenAPI models from javadoc generation
230+
exclude 'io/permit/sdk/openapi/models/**'
231+
}
232+
228233
tasks.named('jar') {
229234
manifest {
230235
attributes('Implementation-Title': project.name,

src/main/java/io/permit/sdk/api/models/ElementsLoginResult.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ public ElementsLoginResult() {
1717
}
1818

1919
/**
20-
*
21-
* @param redirectUrl
20+
* @param redirectUrl The URL to redirect the user to after login
2221
*/
2322
public ElementsLoginResult(String redirectUrl) {
2423
super(redirectUrl);

0 commit comments

Comments
 (0)