Skip to content

Commit 0aeefa0

Browse files
committed
Update example with additionalProperties
1 parent b357b5a commit 0aeefa0

File tree

2 files changed

+44
-18
lines changed

2 files changed

+44
-18
lines changed

example/input.yaml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1544,4 +1544,21 @@ definitions:
15441544
- version
15451545
- type
15461546
- body
1547-
- provider
1547+
- provider
1548+
1549+
Credentials:
1550+
type: object
1551+
description: |
1552+
Map of configuration variable names to values. Names must match
1553+
`^[a-zA-Z][a-zA-Z0-9_]{0,999}$`.
1554+
additionalProperties:
1555+
type: string
1556+
FeatureMap:
1557+
type: object
1558+
description: A map of feature labels to selected values for customizable features
1559+
additionalProperties: true
1560+
x-go-type:
1561+
type: FeatureMap
1562+
import:
1563+
package: github.com/manifoldco/go-manifold
1564+
alias: manifold

example/output.ts

Lines changed: 26 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ namespace OpenAPI2 {
4343
features?: ProductIntegrationFeatures;
4444
}
4545
export enum UpdateProductBodyIntegrationVersion {
46-
V1 = "v1"
46+
V1 = 'v1'
4747
}
4848
export interface UpdateProduct {
4949
id: string;
@@ -87,7 +87,7 @@ namespace OpenAPI2 {
8787
Version1 = 1
8888
}
8989
export enum RegionType {
90-
Region = "region"
90+
Region = 'region'
9191
}
9292
export interface ProviderBody {
9393
teamId: string;
@@ -104,11 +104,12 @@ namespace OpenAPI2 {
104104
body: ProviderBody;
105105
}
106106
export enum ProviderType {
107-
Provider = "provider"
107+
Provider = 'provider'
108108
}
109109
export enum ProviderVersion {
110110
Version1 = 1
111111
}
112+
export interface ProductTags {}
112113
export interface ProductListing {
113114
// When true, everyone can see the product when requested. When false it will
114115
// not be visible to anyone except those on the provider team.
@@ -155,8 +156,8 @@ namespace OpenAPI2 {
155156
region?: ProductIntegrationFeaturesRegion;
156157
}
157158
export enum ProductIntegrationFeaturesRegion {
158-
UserSpecified = "user-specified",
159-
Unspecified = "unspecified"
159+
UserSpecified = 'user-specified',
160+
Unspecified = 'unspecified'
160161
}
161162
export interface ProductBody {
162163
providerId: string;
@@ -189,19 +190,19 @@ namespace OpenAPI2 {
189190
features: ProductIntegrationFeatures;
190191
}
191192
export enum ProductBodyIntegrationVersion {
192-
V1 = "v1"
193+
V1 = 'v1'
193194
}
194195
export interface ProductBodyBilling {
195196
type: ProductBodyBillingType;
196197
currency: ProductBodyBillingCurrency;
197198
}
198199
export enum ProductBodyBillingCurrency {
199-
Usd = "usd"
200+
Usd = 'usd'
200201
}
201202
export enum ProductBodyBillingType {
202-
MonthlyProrated = "monthly-prorated",
203-
MonthlyAnniversary = "monthly-anniversary",
204-
AnnualAnniversary = "annual-anniversary"
203+
MonthlyProrated = 'monthly-prorated',
204+
MonthlyAnniversary = 'monthly-anniversary',
205+
AnnualAnniversary = 'annual-anniversary'
205206
}
206207
export interface ProductBodyTerms {
207208
url?: string;
@@ -214,11 +215,12 @@ namespace OpenAPI2 {
214215
body: ProductBody;
215216
}
216217
export enum ProductType {
217-
Product = "product"
218+
Product = 'product'
218219
}
219220
export enum ProductVersion {
220221
Version1 = 1
221222
}
223+
export interface PlanResizeList {}
222224
export interface PlanBody {
223225
providerId: string;
224226
productId: string;
@@ -244,11 +246,12 @@ namespace OpenAPI2 {
244246
body: PlanBody;
245247
}
246248
export enum PlanType {
247-
Plan = "plan"
249+
Plan = 'plan'
248250
}
249251
export enum PlanVersion {
250252
Version1 = 1
251253
}
254+
export interface FeatureValuesList {}
252255
export interface FeatureValueDetails {
253256
label: string;
254257
name: string;
@@ -299,9 +302,9 @@ namespace OpenAPI2 {
299302
values?: FeatureValueDetails[];
300303
}
301304
export enum FeatureTypeType {
302-
Boolean = "boolean",
303-
String = "string",
304-
Number = "number"
305+
Boolean = 'boolean',
306+
String = 'string',
307+
Number = 'number'
305308
}
306309
export interface FeatureNumericRange {
307310
// Defines the end of the range ( inclusive ), from the previous, or 0;
@@ -329,6 +332,9 @@ namespace OpenAPI2 {
329332
suffix?: string;
330333
costRanges?: FeatureNumericRange[];
331334
}
335+
export interface FeatureMap {
336+
[name: string]: any;
337+
}
332338
export interface ExpandedProduct {
333339
id: string;
334340
version: ExpandedProductVersion;
@@ -338,7 +344,7 @@ namespace OpenAPI2 {
338344
provider: Provider;
339345
}
340346
export enum ExpandedProductType {
341-
Product = "product"
347+
Product = 'product'
342348
}
343349
export enum ExpandedProductVersion {
344350
Version1 = 1
@@ -360,7 +366,7 @@ namespace OpenAPI2 {
360366
body: ExpandedPlanBody;
361367
}
362368
export enum ExpandedPlanType {
363-
Plan = "plan"
369+
Plan = 'plan'
364370
}
365371
export enum ExpandedPlanVersion {
366372
Version1 = 1
@@ -376,6 +382,9 @@ namespace OpenAPI2 {
376382
// Explanation of the errors
377383
message: string[];
378384
}
385+
export interface Credentials {
386+
[name: string]: string;
387+
}
379388
export interface CreateRegion {
380389
body: RegionBody;
381390
}

0 commit comments

Comments
 (0)