Skip to content

Commit d36be18

Browse files
committed
docs: clarify OpenAPI spec path and adjust template paths order
- customer-service/README.md * Refined OpenAPI contract explanation * Reworded line: "For clarity, in this repository it is saved under the client module..." * Standardized license section wording - customer-service-client/README.md * Added explicit spec location bullet * Added explicit template directory bullet * Reordered key files section for logical flow: directory → templates → output → packages * Unified license note
1 parent 6bb90c6 commit d36be18

File tree

2 files changed

+20
-13
lines changed

2 files changed

+20
-13
lines changed

customer-service-client/README.md

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ Before generating or using the client, make sure you have:
109109
* **Java 21** or newer
110110
* **Maven 3.9+** (or Gradle 8+ if you adapt the build)
111111
* A running instance of the `customer-service` exposing its OpenAPI spec
112+
* OpenAPI spec (saved locally in this repo as `src/main/resources/customer-api-docs.yaml`)
112113

113114
---
114115

@@ -160,7 +161,8 @@ Consumer code (e.g., adapter) gets compile-time type safety
160161

161162
**Key files**
162163

163-
* Templates: `src/main/resources/openapi-templates/api_wrapper.mustache`, `.../model.mustache`
164+
* Template directory: `src/main/resources/openapi-templates/`
165+
* Templates (overlay): `src/main/resources/openapi-templates/api_wrapper.mustache`, `.../model.mustache`
164166
* Generated output: `target/generated-sources/openapi/src/gen/java`
165167
* Packages (from `pom.xml`): `apiPackage`, `modelPackage`, `invokerPackage`
166168

@@ -239,7 +241,6 @@ public class CustomerApiClientConfig {
239241
```properties
240242
customer.api.base-url=http://localhost:8084/customer-service
241243
```
242-
243244
**Usage example:**
244245

245246
```java
@@ -556,11 +557,6 @@ as-is. However, the hook is available if your project needs to enforce additiona
556557
Validation)
557558
on top of generated wrapper classes.
558559

559-
---
560-
561-
## 🛡 License
562-
563-
This repository is licensed under **MIT** (root `LICENSE`). Submodules inherit the license.
564560

565561
---
566562

@@ -569,3 +565,17 @@ This repository is licensed under **MIT** (root `LICENSE`). Submodules inherit t
569565
This client is generated from the OpenAPI spec exposed by:
570566

571567
* [customer-service](../customer-service/README.md) — Sample Spring Boot microservice (API producer).
568+
569+
---
570+
571+
## 🤝 Contributing
572+
573+
Contributions, issues, and feature requests are welcome!
574+
Feel free to [open an issue](../../issues) or submit a PR.
575+
576+
---
577+
578+
## 🛡 License
579+
580+
This repository is licensed under **MIT** (root `LICENSE`). Submodules inherit the license.
581+

customer-service/README.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -163,11 +163,8 @@ http://localhost:8084/customer-service/v1/customers
163163
* OpenAPI JSON → `http://localhost:8084/customer-service/v3/api-docs`
164164
* OpenAPI YAML → `http://localhost:8084/customer-service/v3/api-docs.yaml`
165165

166-
➡️ The YAML/JSON spec above is the **contract** that the client module (`customer-service-client`) consumes when
167-
generating code.
168-
For clarity, in this repository the file is saved under the client module as
169-
`src/main/resources/customer-api-docs.yaml`.
170-
166+
➡️ The YAML/JSON spec above is the **contract** that the client module (`customer-service-client`) consumes when generating code.
167+
For clarity, in this repository it is saved under the client module as `src/main/resources/customer-api-docs.yaml`.
171168
---
172169

173170
### Example Wrapper Snippet
@@ -296,4 +293,4 @@ Feel free to [open an issue](../../issues) or submit a PR.
296293

297294
## 🛡 License
298295

299-
MIT
296+
This repository is licensed under **MIT** (root `LICENSE`). Submodules inherit the license.

0 commit comments

Comments
 (0)