-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
doc: Add documentation to generate the API client
It will be helpful to have the documentation for generating the API client in this repository. This patch adds the documentation as MarkDown file
- Loading branch information
1 parent
c6c8bb5
commit 0095bb4
Showing
1 changed file
with
23 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Generating PHP using OpenAPI/Swagger specifications | ||
|
||
The BAG API is using the OpenAPI/Swagger 3.0 specification, which means you can have PHP classes generated | ||
automatically. | ||
|
||
The URL for the BAG Swagger UI is https://lvbag.github.io/BAG-API/Technische%20specificatie/ | ||
|
||
## Prerequisites | ||
|
||
* Make sure the JAVA JDK is at version 17 at least | ||
* Download the latest stable version of the code generator at https://repo1.maven.org/maven2/io/swagger/codegen/v3/swagger-codegen-cli/ | ||
|
||
## Generate | ||
|
||
Go one level before the root of this repository and enter the following in CLI: | ||
`java -jar swagger-codegen-cli.jar generate -i https://api.bag.kadaster.nl/lvbag/individuelebevragingen/v2/openapi.json -l php -o kadaster-bag-api-client` | ||
|
||
## Namespaces | ||
|
||
The generator will use the namespace `Swagger\Client` for the generated PHP classes. This is not desired, especially | ||
when combining multiple Swagger API's. | ||
|
||
Therefor we renamed the namespace to `Kadaster\BapApiClient` |