Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ public static enum PROVIDED_IN_LEVEL {none, root, any, platform}
public static final String RXJS_VERSION = "rxjsVersion";
public static final String NGPACKAGR_VERSION = "ngPackagrVersion";
public static final String ZONEJS_VERSION = "zonejsVersion";
public static final String INCLUDE_ENDPOINT_URL = "includeEndpointUrl";

protected String ngVersion = "20.0.0";
@Getter @Setter
Expand Down Expand Up @@ -156,7 +155,6 @@ public TypeScriptAngularClientCodegen() {
this.cliOptions.add(new CliOption(RXJS_VERSION, "The version of RxJS compatible with Angular (see ngVersion option)."));
this.cliOptions.add(new CliOption(NGPACKAGR_VERSION, "The version of ng-packagr compatible with Angular (see ngVersion option)."));
this.cliOptions.add(new CliOption(ZONEJS_VERSION, "The version of zone.js compatible with Angular (see ngVersion option)."));
this.cliOptions.add(CliOption.newBoolean(INCLUDE_ENDPOINT_URL, "Include endpoint URL as comment in generated service methods.", false));
}

@Override
Expand Down Expand Up @@ -311,11 +309,6 @@ public void processOpts() {
additionalProperties.put("isQueryParamObjectFormatJson", getQueryParamObjectFormatJson());
additionalProperties.put("isQueryParamObjectFormatKey", getQueryParamObjectFormatKey());

if (additionalProperties.containsKey(INCLUDE_ENDPOINT_URL)) {
boolean includeEndpointUrl = Boolean.parseBoolean(additionalProperties.get(INCLUDE_ENDPOINT_URL).toString());
additionalProperties.put(INCLUDE_ENDPOINT_URL, includeEndpointUrl);
}

}

@Data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,7 @@ export class {{classname}} extends BaseService {
{{#notes}}
* {{.}}
{{/notes}}
{{#includeEndpointUrl}}
* @endpoint {{httpMethod}} {{{path}}}
{{/includeEndpointUrl}}
{{^useSingleRequestParameter}}
{{#allParams}}
* @param {{paramName}} {{description}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@ export interface {{classname}}Interface {
/**
* {{summary}}
* {{notes}}
{{#includeEndpointUrl}}
* @endpoint {{httpMethod}} {{{path}}}
{{/includeEndpointUrl}}
{{^useSingleRequestParameter}}
{{#allParams}}* @param {{paramName}} {{description}}
{{/allParams}}{{/useSingleRequestParameter}}{{#useSingleRequestParameter}}{{#allParams.0}}* @param requestParameters
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export class PetService extends BaseService {
}

/**
* @endpoint get /pet/mapped
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export class PetService extends BaseService {
}

/**
* @endpoint get /pet/mapped
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export class DefaultService extends BaseService {
}

/**
* @endpoint get /
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
Expand Down Expand Up @@ -82,6 +83,7 @@ export class DefaultService extends BaseService {
}

/**
* @endpoint put /
* @param body
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export class PetService extends BaseService {

/**
* Add a new pet to the store
* @endpoint post /pet
* @param body Pet object that needs to be added to the store
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
Expand Down Expand Up @@ -103,6 +104,7 @@ export class PetService extends BaseService {

/**
* Deletes a pet
* @endpoint delete /pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}
* @param petId Pet id to delete
* @param apiKey
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
Expand Down Expand Up @@ -161,6 +163,7 @@ export class PetService extends BaseService {
/**
* Finds Pets by status
* Multiple status values can be provided with comma separated strings
* @endpoint get /pet/findByStatus
* @param status Status values that need to be considered for filter
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
Expand Down Expand Up @@ -224,6 +227,7 @@ export class PetService extends BaseService {
/**
* Finds Pets by tags
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
* @endpoint get /pet/findByTags
* @param tags Tags to filter by
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
Expand Down Expand Up @@ -288,6 +292,7 @@ export class PetService extends BaseService {
/**
* Find pet by ID
* Returns a single pet
* @endpoint get /pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}
* @param petId ID of pet to return
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
Expand Down Expand Up @@ -343,6 +348,7 @@ export class PetService extends BaseService {

/**
* Update an existing pet
* @endpoint put /pet
* @param body Pet object that needs to be added to the store
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
Expand Down Expand Up @@ -407,6 +413,7 @@ export class PetService extends BaseService {

/**
* Updates a pet in the store with form data
* @endpoint post /pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}
* @param petId ID of pet that needs to be updated
* @param name Updated name of the pet
* @param status Updated status of the pet
Expand Down Expand Up @@ -485,6 +492,7 @@ export class PetService extends BaseService {

/**
* uploads an image
* @endpoint post /pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}/uploadImage
* @param petId ID of pet to update
* @param additionalMetadata Additional data to pass to server
* @param file file to upload
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export class StoreService extends BaseService {
/**
* Delete purchase order by ID
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
* @endpoint delete /store/order/${this.configuration.encodeParam({name: "orderId", value: orderId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}
* @param orderId ID of the order that needs to be deleted
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
Expand Down Expand Up @@ -89,6 +90,7 @@ export class StoreService extends BaseService {
/**
* Returns pet inventories by status
* Returns a map of status codes to quantities
* @endpoint get /store/inventory
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
Expand Down Expand Up @@ -140,6 +142,7 @@ export class StoreService extends BaseService {
/**
* Find purchase order by ID
* For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions
* @endpoint get /store/order/${this.configuration.encodeParam({name: "orderId", value: orderId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}
* @param orderId ID of pet that needs to be fetched
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
Expand Down Expand Up @@ -192,6 +195,7 @@ export class StoreService extends BaseService {

/**
* Place an order for a pet
* @endpoint post /store/order
* @param body order placed for purchasing the pet
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export class UserService extends BaseService {
/**
* Create user
* This can only be done by the logged in user.
* @endpoint post /user
* @param body Created user object
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
Expand Down Expand Up @@ -97,6 +98,7 @@ export class UserService extends BaseService {

/**
* Creates list of users with given input array
* @endpoint post /user/createWithArray
* @param body List of user object
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
Expand Down Expand Up @@ -156,6 +158,7 @@ export class UserService extends BaseService {

/**
* Creates list of users with given input array
* @endpoint post /user/createWithList
* @param body List of user object
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
Expand Down Expand Up @@ -216,6 +219,7 @@ export class UserService extends BaseService {
/**
* Delete user
* This can only be done by the logged in user.
* @endpoint delete /user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}
* @param username The name that needs to be deleted
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
Expand Down Expand Up @@ -266,6 +270,7 @@ export class UserService extends BaseService {

/**
* Get user by user name
* @endpoint get /user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}
* @param username The name that needs to be fetched. Use user1 for testing.
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
Expand Down Expand Up @@ -318,6 +323,7 @@ export class UserService extends BaseService {

/**
* Logs user into the system
* @endpoint get /user/login
* @param username The user name for login
* @param password The password for login in clear text
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
Expand Down Expand Up @@ -381,6 +387,7 @@ export class UserService extends BaseService {

/**
* Logs out current logged in user session
* @endpoint get /user/logout
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
Expand Down Expand Up @@ -428,6 +435,7 @@ export class UserService extends BaseService {
/**
* Updated user
* This can only be done by the logged in user.
* @endpoint put /user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}
* @param username name that need to be deleted
* @param body Updated user object
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export class PetService extends BaseService {

/**
* Add a new pet to the store
* @endpoint post /pet
* @param body Pet object that needs to be added to the store
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
Expand Down Expand Up @@ -103,6 +104,7 @@ export class PetService extends BaseService {

/**
* Deletes a pet
* @endpoint delete /pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}
* @param petId Pet id to delete
* @param apiKey
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
Expand Down Expand Up @@ -161,6 +163,7 @@ export class PetService extends BaseService {
/**
* Finds Pets by status
* Multiple status values can be provided with comma separated strings
* @endpoint get /pet/findByStatus
* @param status Status values that need to be considered for filter
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
Expand Down Expand Up @@ -224,6 +227,7 @@ export class PetService extends BaseService {
/**
* Finds Pets by tags
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
* @endpoint get /pet/findByTags
* @param tags Tags to filter by
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
Expand Down Expand Up @@ -288,6 +292,7 @@ export class PetService extends BaseService {
/**
* Find pet by ID
* Returns a single pet
* @endpoint get /pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}
* @param petId ID of pet to return
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
Expand Down Expand Up @@ -343,6 +348,7 @@ export class PetService extends BaseService {

/**
* Update an existing pet
* @endpoint put /pet
* @param body Pet object that needs to be added to the store
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
Expand Down Expand Up @@ -407,6 +413,7 @@ export class PetService extends BaseService {

/**
* Updates a pet in the store with form data
* @endpoint post /pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}
* @param petId ID of pet that needs to be updated
* @param name Updated name of the pet
* @param status Updated status of the pet
Expand Down Expand Up @@ -485,6 +492,7 @@ export class PetService extends BaseService {

/**
* uploads an image
* @endpoint post /pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}/uploadImage
* @param petId ID of pet to update
* @param additionalMetadata Additional data to pass to server
* @param file file to upload
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export class StoreService extends BaseService {
/**
* Delete purchase order by ID
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
* @endpoint delete /store/order/${this.configuration.encodeParam({name: "orderId", value: orderId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}
* @param orderId ID of the order that needs to be deleted
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
Expand Down Expand Up @@ -89,6 +90,7 @@ export class StoreService extends BaseService {
/**
* Returns pet inventories by status
* Returns a map of status codes to quantities
* @endpoint get /store/inventory
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
Expand Down Expand Up @@ -140,6 +142,7 @@ export class StoreService extends BaseService {
/**
* Find purchase order by ID
* For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions
* @endpoint get /store/order/${this.configuration.encodeParam({name: "orderId", value: orderId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}
* @param orderId ID of pet that needs to be fetched
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
Expand Down Expand Up @@ -192,6 +195,7 @@ export class StoreService extends BaseService {

/**
* Place an order for a pet
* @endpoint post /store/order
* @param body order placed for purchasing the pet
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
Expand Down
Loading
Loading