Skip to content

Commit b61ac00

Browse files
committed
Add html.yaml config and document testing requirements
Due to network limitations in the automated build environment, the following steps could not be completed but are required per contribution guidelines: 1. Build project: ./mvnw clean install -DskipTests 2. Regenerate samples: ./bin/generate-samples.sh bin/configs/html.yaml 3. Commit updated samples: git add samples/documentation/html/ Added: - bin/configs/html.yaml: Configuration for html generator samples - TESTING_STEPS.md: Detailed instructions for completing the PR The template fix in bodyParam.mustache is complete and correct. Sample regeneration is needed to verify the fix visually in the generated HTML documentation.
1 parent 343865c commit b61ac00

2 files changed

Lines changed: 98 additions & 0 deletions

File tree

TESTING_STEPS.md

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# Testing Steps Required for HTML Generator Fix
2+
3+
This document outlines the steps that need to be completed to finalize the HTML generator array type fix according to the contribution guidelines.
4+
5+
## What Was Fixed
6+
7+
Fixed the `bodyParam.mustache` template in `/modules/openapi-generator/src/main/resources/htmlDocs/` to properly display array types for request body parameters.
8+
9+
**Before:** `User`
10+
**After:** `array[User]`
11+
12+
## Steps to Complete (Due to Build Environment Limitations)
13+
14+
The following steps could not be completed in the automated environment due to network restrictions preventing Maven from downloading dependencies:
15+
16+
### 1. Build the Project
17+
18+
```bash
19+
./mvnw clean install -DskipTests -Dmaven.javadoc.skip=true
20+
```
21+
22+
This generates the `openapi-generator-cli.jar` needed for sample generation.
23+
24+
### 2. Create HTML Generator Config (Already Done)
25+
26+
Created `/bin/configs/html.yaml` with:
27+
```yaml
28+
generatorName: html
29+
outputDir: samples/documentation/html
30+
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
31+
templateDir: modules/openapi-generator/src/main/resources/htmlDocs
32+
additionalProperties:
33+
hideGenerationTimestamp: "true"
34+
```
35+
36+
### 3. Regenerate HTML Samples
37+
38+
```bash
39+
./bin/generate-samples.sh bin/configs/html.yaml
40+
```
41+
42+
This will update `/samples/documentation/html/index.html` with the fix.
43+
44+
### 4. Verify the Fix
45+
46+
Check that in `samples/documentation/html/index.html`, the `createUsersWithArrayInput` endpoint now shows:
47+
- Body parameter: `User array[User] (required)` instead of just `User (required)`
48+
49+
Or similar array body parameters show the `array[TypeName]` format.
50+
51+
### 5. Commit the Updated Samples
52+
53+
```bash
54+
git add bin/configs/html.yaml
55+
git add samples/documentation/html/
56+
git commit -m "Add html.yaml config and update HTML samples after array type fix"
57+
```
58+
59+
### 6. Optional: Run Tests
60+
61+
```bash
62+
mvn verify -Psamples
63+
```
64+
65+
### 7. Push All Changes
66+
67+
```bash
68+
git push origin claude/fix-html-array-types-aPDDX
69+
```
70+
71+
## Verification
72+
73+
To verify the fix is working correctly, look for any endpoint in the generated HTML that has an array body parameter. For example, in the Petstore spec, the `/user/createWithArray` endpoint should show:
74+
75+
```html
76+
<div class="param">user array[<a href="#User">User</a>] (required)</div>
77+
```
78+
79+
Instead of:
80+
81+
```html
82+
<div class="param">user <a href="#User">User</a> (required)</div>
83+
```
84+
85+
## Current Status
86+
87+
✅ Template fix committed
88+
✅ Config file created
89+
❌ Samples not regenerated (requires build)
90+
❌ Tests not run (requires build)
91+
92+
The template fix is correct and ready, but sample regeneration is required to complete the PR per contribution guidelines.

bin/configs/html.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
generatorName: html
2+
outputDir: samples/documentation/html
3+
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
4+
templateDir: modules/openapi-generator/src/main/resources/htmlDocs
5+
additionalProperties:
6+
hideGenerationTimestamp: "true"

0 commit comments

Comments
 (0)