Skip to content

Commit 2066e0b

Browse files
committed
Deduplicated endpoints.
1 parent 1fd8c1d commit 2066e0b

File tree

10 files changed

+895
-1174
lines changed

10 files changed

+895
-1174
lines changed

README.md

Lines changed: 77 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,77 @@ This repository contains a comprehensive OpenAPI specification that fully descri
4141
```bash
4242
make gen-openapi-spec
4343
```
44-
This creates `capi/3.181.0.openapi.yaml` and `capi/3.181.0.openapi.json`
44+
This creates `capi/3.195.0.openapi.yaml` and `capi/3.195.0.openapi.json`
4545

4646
3. **Generate a client SDK** (example for Go)
4747
```bash
4848
make gen-go-client
4949
```
5050

51+
## SDK Generation
52+
53+
The `bin/gen` script provides a flexible way to generate SDKs for different languages and CAPI versions.
54+
55+
### Usage
56+
```bash
57+
./bin/gen --version=VERSION --language=LANGUAGE [--output=PATH]
58+
```
59+
60+
### Examples
61+
62+
#### Generate Go SDK for latest CAPI version (3.195.0)
63+
```bash
64+
./bin/gen --version=3.195.0 --language=go
65+
# Output: ./sdk/3.195.0/go/
66+
```
67+
68+
#### Generate Ruby SDK for latest CAPI version
69+
```bash
70+
./bin/gen --version=3.195.0 --language=ruby
71+
# Output: ./sdk/3.195.0/ruby/
72+
```
73+
74+
#### Generate Python SDK with custom output path
75+
```bash
76+
./bin/gen --version=3.195.0 --language=python --output=/path/to/my-sdk
77+
```
78+
79+
#### Generate SDKs for older CAPI version
80+
```bash
81+
# Go SDK for CAPI 3.181.0
82+
./bin/gen --version=3.181.0 --language=go
83+
84+
# Ruby SDK for CAPI 3.181.0
85+
./bin/gen --version=3.181.0 --language=ruby
86+
```
87+
88+
### Supported Languages
89+
90+
The generator supports all languages provided by OpenAPI Generator, including:
91+
- **go** - Go client library
92+
- **ruby** - Ruby gem
93+
- **python** - Python package
94+
- **java** - Java library
95+
- **javascript** - JavaScript/Node.js
96+
- **typescript-node** - TypeScript for Node.js
97+
- **csharp** - C# / .NET
98+
- **php** - PHP library
99+
- **rust** - Rust crate
100+
- **swift5** - Swift 5
101+
- **kotlin** - Kotlin
102+
- And many more...
103+
104+
Run `./bin/gen --help` to see the full list of supported languages.
105+
106+
### Post-Generation Steps
107+
108+
After generating an SDK, you may need to:
109+
110+
1. **Go**: Run `go mod tidy` in the generated directory
111+
2. **Ruby**: Build the gem with `gem build *.gemspec`
112+
3. **Python**: Install with `pip install -e .`
113+
4. **Java**: Build with Maven or Gradle
114+
51115
## Version Information
52116

53117
| Component | Version |
@@ -106,24 +170,30 @@ Features marked as experimental using the `x-experimental` extension:
106170
### Project Structure
107171
```
108172
capi/
109-
├── 3.181.0/
173+
├── 3.195.0/
110174
│ ├── apps.yml
111175
│ ├── processes.yml
112176
│ ├── services.yml
113-
│ └── ... (44 resource files)
114-
├── 3.181.0.openapi.yaml (generated)
115-
└── 3.181.0.openapi.json (generated)
177+
│ └── ... (41 resource files)
178+
├── 3.195.0.openapi.yaml (generated)
179+
└── 3.195.0.openapi.json (generated)
180+
bin/
181+
├── capi-openapi (main processing script)
182+
└── gen (SDK generation script)
183+
sdk/
184+
└── VERSION/
185+
└── LANGUAGE/ (generated SDKs)
116186
```
117187

118188
### Validation
119189

120190
Validate the OpenAPI specification:
121191
```bash
122192
# Using openapi-generator
123-
openapi-generator validate -i capi/3.181.0.openapi.yaml
193+
openapi-generator validate -i capi/3.195.0.openapi.yaml
124194

125195
# Using swagger-cli
126-
swagger-cli validate capi/3.181.0.openapi.yaml
196+
swagger-cli validate capi/3.195.0.openapi.yaml
127197
```
128198

129199
### Contributing

bin/capi-openapi

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,18 @@ my @endpoints = (qw(
3333
app_usage_events
3434
apps
3535
audit_events
36+
auth
3637
buildpacks
3738
builds
3839
deployments
3940
domains
4041
droplets
4142
environment_variable_groups
43+
errors
4244
feature_flags
4345
info
4446
isolation_segments
47+
jobs
4548
organization_quotas
4649
organizations
4750
packages
@@ -61,7 +64,6 @@ my @endpoints = (qw(
6164
service_route_bindings
6265
service_usage_events
6366
sidecars
64-
space_features
6567
space_quotas
6668
spaces
6769
stacks

capi/3.195.0/app_features.yml

Lines changed: 0 additions & 244 deletions
This file was deleted.

0 commit comments

Comments
 (0)