Skip to content

Commit d30fed7

Browse files
feat: add openapi target
1 parent 9ab1422 commit d30fed7

File tree

6 files changed

+14
-5
lines changed

6 files changed

+14
-5
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 20
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/stainless%2Fstainless-v0-babb926f3cc81e4b1d5f10f5cb0f36fc2fd5da122c32a9c2d373d83cb8977848.yml
3-
openapi_spec_hash: e8cb8b819592f7703532f3a7ef1585ef
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/stainless%2Fstainless-v0-6783cf45e0ea6644994eae08c41f755e29948bee313a6c2aaf5b710253eb4eaa.yml
3+
openapi_spec_hash: b37f9ad1ca6bce774c6448b28d267bec
44
config_hash: f1b8a43873719fc8f2789008f3aa2260

aliases.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,3 +105,6 @@ const TargetPhp = shared.TargetPhp
105105

106106
// Equals "csharp"
107107
const TargetCsharp = shared.TargetCsharp
108+
109+
// Equals "openapi"
110+
const TargetOpenAPI = shared.TargetOpenAPI

build.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,7 @@ type BuildTargets struct {
234234
Java BuildTarget `json:"java"`
235235
Kotlin BuildTarget `json:"kotlin"`
236236
Node BuildTarget `json:"node"`
237+
OpenAPI BuildTarget `json:"openapi"`
237238
Php BuildTarget `json:"php"`
238239
Python BuildTarget `json:"python"`
239240
Ruby BuildTarget `json:"ruby"`
@@ -247,6 +248,7 @@ type BuildTargets struct {
247248
Java respjson.Field
248249
Kotlin respjson.Field
249250
Node respjson.Field
251+
OpenAPI respjson.Field
250252
Php respjson.Field
251253
Python respjson.Field
252254
Ruby respjson.Field
@@ -847,6 +849,7 @@ type BuildNewParamsTargetCommitMessages struct {
847849
Java param.Opt[string] `json:"java,omitzero"`
848850
Kotlin param.Opt[string] `json:"kotlin,omitzero"`
849851
Node param.Opt[string] `json:"node,omitzero"`
852+
OpenAPI param.Opt[string] `json:"openapi,omitzero"`
850853
Php param.Opt[string] `json:"php,omitzero"`
851854
Python param.Opt[string] `json:"python,omitzero"`
852855
Ruby param.Opt[string] `json:"ruby,omitzero"`

build_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ func TestBuildNewWithOptionalParams(t *testing.T) {
4242
Java: stainless.String("java"),
4343
Kotlin: stainless.String("kotlin"),
4444
Node: stainless.String("node"),
45+
OpenAPI: stainless.String("openapi"),
4546
Php: stainless.String("php"),
4647
Python: stainless.String("python"),
4748
Ruby: stainless.String("ruby"),

buildtargetoutput.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ func (r *BuildTargetOutputGetResponseUnion) UnmarshalJSON(data []byte) error {
131131
type BuildTargetOutputGetResponseURL struct {
132132
Output constant.URL `json:"output,required"`
133133
// Any of "node", "typescript", "python", "go", "java", "kotlin", "ruby",
134-
// "terraform", "cli", "php", "csharp".
134+
// "terraform", "cli", "php", "csharp", "openapi".
135135
Target shared.Target `json:"target,required"`
136136
// Any of "source", "dist", "wheel".
137137
Type BuildTargetOutputGetResponseURLType `json:"type,required"`
@@ -169,7 +169,7 @@ type BuildTargetOutputGetResponseGit struct {
169169
// Git reference (commit SHA, branch, or tag)
170170
Ref string `json:"ref,required"`
171171
// Any of "node", "typescript", "python", "go", "java", "kotlin", "ruby",
172-
// "terraform", "cli", "php", "csharp".
172+
// "terraform", "cli", "php", "csharp", "openapi".
173173
Target shared.Target `json:"target,required"`
174174
// Any of "source", "dist", "wheel".
175175
Type BuildTargetOutputGetResponseGitType `json:"type,required"`
@@ -216,7 +216,7 @@ type BuildTargetOutputGetParams struct {
216216
// SDK language target name
217217
//
218218
// Any of "node", "typescript", "python", "go", "java", "kotlin", "ruby",
219-
// "terraform", "cli", "php", "csharp".
219+
// "terraform", "cli", "php", "csharp", "openapi".
220220
Target BuildTargetOutputGetParamsTarget `query:"target,omitzero,required" json:"-"`
221221
// Any of "source", "dist", "wheel".
222222
Type BuildTargetOutputGetParamsType `query:"type,omitzero,required" json:"-"`
@@ -251,6 +251,7 @@ const (
251251
BuildTargetOutputGetParamsTargetCli BuildTargetOutputGetParamsTarget = "cli"
252252
BuildTargetOutputGetParamsTargetPhp BuildTargetOutputGetParamsTarget = "php"
253253
BuildTargetOutputGetParamsTargetCsharp BuildTargetOutputGetParamsTarget = "csharp"
254+
BuildTargetOutputGetParamsTargetOpenAPI BuildTargetOutputGetParamsTarget = "openapi"
254255
)
255256

256257
type BuildTargetOutputGetParamsType string

shared/shared.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,4 +150,5 @@ const (
150150
TargetCli Target = "cli"
151151
TargetPhp Target = "php"
152152
TargetCsharp Target = "csharp"
153+
TargetOpenAPI Target = "openapi"
153154
)

0 commit comments

Comments
 (0)