Skip to content

Commit

Permalink
feat: quote params
Browse files Browse the repository at this point in the history
  • Loading branch information
GregoryMerlet committed Nov 25, 2024
1 parent 9d9259e commit eabc989
Show file tree
Hide file tree
Showing 16 changed files with 60 additions and 60 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export interface {{classname}}{{operationIdCamelCase}}Request {
* @type {{=<% %>=}}{<%&dataType%>}<%={{ }}=%>
* @memberof {{classname}}{{operationIdCamelCase}}
*/
readonly {{paramName}}{{^required}}?{{/required}}: {{{dataType}}}
readonly '{{paramName}}'{{^required}}?{{/required}}: {{{dataType}}}
{{^-last}}

{{/-last}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ export interface {{classname}}{{#allParents}}{{#-first}} extends {{/-first}}{{{.
* {{{.}}}
*/
{{/description}}
{{#isReadOnly}}readonly {{/isReadOnly}}{{{name}}}{{^required}}?{{/required}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{#isNullable}} | null{{/isNullable}};
{{#isReadOnly}}readonly {{/isReadOnly}}'{{{name}}}'{{^required}}?{{/required}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{#isNullable}} | null{{/isNullable}};
{{/vars}}
}{{>modelGenericEnums}}
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ export interface {{classname}} { {{>modelGenericAdditionalProperties}}
* {{{.}}}
*/
{{/description}}
{{name}}{{^required}}?{{/required}}: {{#discriminatorValue}}'{{.}}'{{/discriminatorValue}}{{^discriminatorValue}}{{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{/discriminatorValue}}{{#isNullable}} | null{{/isNullable}};
'{{name}}'{{^required}}?{{/required}}: {{#discriminatorValue}}'{{.}}'{{/discriminatorValue}}{{^discriminatorValue}}{{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{/discriminatorValue}}{{#isNullable}} | null{{/isNullable}};
{{/allVars}}
}
{{>modelGenericEnums}}
{{/parent}}
{{^parent}}
{{>modelGeneric}}
{{/parent}}
{{/discriminator}}
{{/discriminator}}
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
* Describes the result of uploading an image resource
*/
export interface ApiResponse {
code?: number;
type?: string;
message?: string;
'code'?: number;
'type'?: string;
'message'?: string;
}

Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* A category for a pet
*/
export interface Category {
id?: number;
name?: string;
'id'?: number;
'name'?: string;
}

Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
* An order for a pets from the pet store
*/
export interface Order {
id?: number;
petId?: number;
quantity?: number;
shipDate?: string;
'id'?: number;
'petId'?: number;
'quantity'?: number;
'shipDate'?: string;
/**
* Order Status
*/
status?: Order.StatusEnum;
complete?: boolean;
'status'?: Order.StatusEnum;
'complete'?: boolean;
}
export namespace Order {
export type StatusEnum = 'placed' | 'approved' | 'delivered';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ import { Tag } from './tag';
* A pet for sale in the pet store
*/
export interface Pet {
id?: number;
category?: Category;
name: string;
photoUrls: Array<string>;
tags?: Array<Tag>;
'id'?: number;
'category'?: Category;
'name': string;
'photoUrls': Array<string>;
'tags'?: Array<Tag>;
/**
* pet status in the store
*/
status?: Pet.StatusEnum;
'status'?: Pet.StatusEnum;
}
export namespace Pet {
export type StatusEnum = 'available' | 'pending' | 'sold';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* A tag for a pet
*/
export interface Tag {
id?: number;
name?: string;
'id'?: number;
'name'?: string;
}

Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@
* A User who is purchasing from the pet store
*/
export interface User {
id?: number;
username?: string;
firstName?: string;
lastName?: string;
email?: string;
password?: string;
phone?: string;
'id'?: number;
'username'?: string;
'firstName'?: string;
'lastName'?: string;
'email'?: string;
'password'?: string;
'phone'?: string;
/**
* User Status
*/
userStatus?: number;
'userStatus'?: number;
}

Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
* Describes the result of uploading an image resource
*/
export interface ApiResponse {
code?: number;
type?: string;
message?: string;
'code'?: number;
'type'?: string;
'message'?: string;
}

Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* A category for a pet
*/
export interface Category {
id?: number;
name?: string;
'id'?: number;
'name'?: string;
}

Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
* An order for a pets from the pet store
*/
export interface Order {
id?: number;
petId?: number;
quantity?: number;
shipDate?: string;
'id'?: number;
'petId'?: number;
'quantity'?: number;
'shipDate'?: string;
/**
* Order Status
*/
status?: Order.StatusEnum;
complete?: boolean;
'status'?: Order.StatusEnum;
'complete'?: boolean;
}
export namespace Order {
export type StatusEnum = 'placed' | 'approved' | 'delivered';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ import { Tag } from './tag';
* A pet for sale in the pet store
*/
export interface Pet {
id?: number;
category?: Category;
name: string;
photoUrls: Array<string>;
tags?: Array<Tag>;
'id'?: number;
'category'?: Category;
'name': string;
'photoUrls': Array<string>;
'tags'?: Array<Tag>;
/**
* pet status in the store
*/
status?: Pet.StatusEnum;
'status'?: Pet.StatusEnum;
}
export namespace Pet {
export type StatusEnum = 'available' | 'pending' | 'sold';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* A tag for a pet
*/
export interface Tag {
id?: number;
name?: string;
'id'?: number;
'name'?: string;
}

Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@
* A User who is purchasing from the pet store
*/
export interface User {
id?: number;
username?: string;
firstName?: string;
lastName?: string;
email?: string;
password?: string;
phone?: string;
'id'?: number;
'username'?: string;
'firstName'?: string;
'lastName'?: string;
'email'?: string;
'password'?: string;
'phone'?: string;
/**
* User Status
*/
userStatus?: number;
'userStatus'?: number;
}

Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ export interface DefaultServiceTestReservedParamNamesRequest {
* @type {string}
* @memberof DefaultServiceTestReservedParamNames
*/
readonly from: string
readonly 'from': string

/**
* Might conflict with headers const
* @type {string}
* @memberof DefaultServiceTestReservedParamNames
*/
readonly headers: string
readonly 'headers': string
}


Expand Down

0 comments on commit eabc989

Please sign in to comment.