@troveng/swagger-gen-ts
Advanced tools
Comparing version 3.0.0-beta.24 to 3.0.0-beta.25
@@ -1,2 +0,2 @@ | ||
declare const wordwrap: (string: string, width?: number) => string[]; | ||
declare const wordwrap: (string: string, width?: number, cut?: boolean, leading?: string) => string[]; | ||
declare const writeHorizontalRule: (length?: number, character?: string) => string; | ||
@@ -8,3 +8,3 @@ declare const safeKey: (key: string) => string; | ||
declare const sanitizeDescription: (description: string) => string; | ||
declare const sanitizeAndFormatDescription: (description: string) => string; | ||
declare const sanitizeAndFormatDescription: (description: string, indent: string) => string; | ||
declare const formatObjectFields: (keys: string[], forceLineBreak?: any, indent?: number) => string; | ||
@@ -11,0 +11,0 @@ declare const stringifyImports: (references: string[] | Set<string>, fileName: string) => string; |
@@ -26,7 +26,7 @@ "use strict"; | ||
var RESERVED_WORDS = require("../constants/generators").RESERVED_WORDS; | ||
var cut = false; | ||
var leading = ""; | ||
var noEditWarning = "WARNING: This file was automatically generated. Do not modify it directly, or your changes will be overwritten."; | ||
var wordwrap = function (string, width) { | ||
var wordwrap = function (string, width, cut, leading) { | ||
if (width === void 0) { width = 80; } | ||
if (cut === void 0) { cut = false; } | ||
if (leading === void 0) { leading = ""; } | ||
var trueWidth = width - leading.length; | ||
@@ -121,4 +121,4 @@ var cutOption = cut ? "|.{" + trueWidth + "}|.+$" : "|\\S+?(\\s|$)"; | ||
exports.sanitizeDescription = sanitizeDescription; | ||
var sanitizeAndFormatDescription = function (description) { | ||
return wordwrap(sanitizeDescription(description), 80).join("\n"); | ||
var sanitizeAndFormatDescription = function (description, indent) { | ||
return wordwrap(sanitizeDescription(description), 80, false, indent + "// ").join("\n"); | ||
}; | ||
@@ -125,0 +125,0 @@ exports.sanitizeAndFormatDescription = sanitizeAndFormatDescription; |
{ | ||
"name": "@troveng/swagger-gen-ts", | ||
"version": "3.0.0-beta.24", | ||
"version": "3.0.0-beta.25", | ||
"description": "Generates API modules, Flow types, JSON schema and more from Swagger specs", | ||
@@ -5,0 +5,0 @@ "engines": { |
@@ -79,3 +79,3 @@ | ||
status = 'SUCCESS'; | ||
OK | ||
// OK | ||
if (process.env.DEV_TOOLS) { | ||
@@ -92,3 +92,3 @@ const TrovCommonModelProfileProfileValidation = Validators.TrovCommonModelProfileProfile.validate(parsedBody); | ||
status = 'FAILURE'; | ||
An unexpected error has occurred. | ||
// An unexpected error has occurred. | ||
if (process.env.DEV_TOOLS) { | ||
@@ -173,3 +173,3 @@ const UnexpectedErrorExceptionValidation = Validators.UnexpectedErrorException.validate(parsedBody); | ||
status = 'SUCCESS'; | ||
OK | ||
// OK | ||
if (process.env.DEV_TOOLS) { | ||
@@ -190,3 +190,4 @@ const TrovCommonModelProfileProfileValidation = Validators.TrovCommonModelProfileProfile.validate(parsedBody); | ||
case 'CustomerAddressNotSupportedException': | ||
The customer address is valid, but the address is not supported. | ||
// The customer address is valid, but the address is not | ||
// supported. | ||
if (process.env.DEV_TOOLS) { | ||
@@ -198,3 +199,3 @@ Validators.CustomerAddressNotSupportedException.assert(parsedBody); | ||
case 'CustomerAgeNotSupportedException': | ||
The customer has an age that is not supported. | ||
// The customer has an age that is not supported. | ||
if (process.env.DEV_TOOLS) { | ||
@@ -206,3 +207,3 @@ Validators.CustomerAgeNotSupportedException.assert(parsedBody); | ||
case 'CustomerProfileInformationMissingException': | ||
The customer profile is missing information. | ||
// The customer profile is missing information. | ||
if (process.env.DEV_TOOLS) { | ||
@@ -228,3 +229,3 @@ Validators.CustomerProfileInformationMissingException.assert(parsedBody); | ||
case 'StateOfResidenceNotSupportedException': | ||
Customer does not reside in an active US state. | ||
// Customer does not reside in an active US state. | ||
if (process.env.DEV_TOOLS) { | ||
@@ -236,3 +237,3 @@ Validators.StateOfResidenceNotSupportedException.assert(parsedBody); | ||
case 'UnexpectedErrorException': | ||
An unexpected error has occurred. | ||
// An unexpected error has occurred. | ||
if (process.env.DEV_TOOLS) { | ||
@@ -319,3 +320,3 @@ Validators.UnexpectedErrorException.assert(parsedBody); | ||
status = 'SUCCESS'; | ||
OK | ||
// OK | ||
if (process.env.DEV_TOOLS) { | ||
@@ -336,3 +337,3 @@ const TrovCommonModelProfileProfileValidation = Validators.TrovCommonModelProfileProfile.validate(parsedBody); | ||
case 'ArgumentException': | ||
The user id is an invalid format. | ||
// The user id is an invalid format. | ||
if (process.env.DEV_TOOLS) { | ||
@@ -344,3 +345,3 @@ Validators.ArgumentException.assert(parsedBody); | ||
case 'UnsupportedImageException': | ||
The file was not a supported image. | ||
// The file was not a supported image. | ||
if (process.env.DEV_TOOLS) { | ||
@@ -361,4 +362,4 @@ Validators.UnsupportedImageException.assert(parsedBody); | ||
status = 'FAILURE'; | ||
The user does not have access to update the profile photo. The customer does not | ||
exist. | ||
// The user does not have access to update the profile photo. The | ||
// customer does not exist. | ||
if (process.env.DEV_TOOLS) { | ||
@@ -375,3 +376,3 @@ const DocumentAccessExceptionValidation = Validators.DocumentAccessException.validate(parsedBody); | ||
status = 'FAILURE'; | ||
An unexpected error has occurred. | ||
// An unexpected error has occurred. | ||
if (process.env.DEV_TOOLS) { | ||
@@ -453,3 +454,3 @@ const UnexpectedErrorExceptionValidation = Validators.UnexpectedErrorException.validate(parsedBody); | ||
status = 'SUCCESS'; | ||
OK | ||
// OK | ||
if (process.env.DEV_TOOLS) { | ||
@@ -470,3 +471,3 @@ const TrovCommonModelProfileProfileValidation = Validators.TrovCommonModelProfileProfile.validate(parsedBody); | ||
case 'ArgumentException': | ||
The user id is an invalid format. | ||
// The user id is an invalid format. | ||
if (process.env.DEV_TOOLS) { | ||
@@ -478,3 +479,3 @@ Validators.ArgumentException.assert(parsedBody); | ||
case 'UnsupportedImageException': | ||
The file was not a supported image. | ||
// The file was not a supported image. | ||
if (process.env.DEV_TOOLS) { | ||
@@ -495,4 +496,4 @@ Validators.UnsupportedImageException.assert(parsedBody); | ||
status = 'FAILURE'; | ||
The user does not have access to update the background photo. The customer does | ||
not exist. | ||
// The user does not have access to update the background photo. The | ||
// customer does not exist. | ||
if (process.env.DEV_TOOLS) { | ||
@@ -509,3 +510,3 @@ const DocumentAccessExceptionValidation = Validators.DocumentAccessException.validate(parsedBody); | ||
status = 'FAILURE'; | ||
An unexpected error has occurred. | ||
// An unexpected error has occurred. | ||
if (process.env.DEV_TOOLS) { | ||
@@ -512,0 +513,0 @@ const UnexpectedErrorExceptionValidation = Validators.UnexpectedErrorException.validate(parsedBody); |
@@ -65,3 +65,3 @@ | ||
status = 'SUCCESS'; | ||
OK | ||
// OK | ||
if (process.env.DEV_TOOLS) { | ||
@@ -78,3 +78,3 @@ const TrovContractAPIUnversionedStatusStatusResponseValidation = Validators.TrovContractAPIUnversionedStatusStatusResponse.validate(parsedBody); | ||
status = 'FAILURE'; | ||
An unexpected error has occurred. | ||
// An unexpected error has occurred. | ||
if (process.env.DEV_TOOLS) { | ||
@@ -144,3 +144,3 @@ const UnexpectedErrorExceptionValidation = Validators.UnexpectedErrorException.validate(parsedBody); | ||
status = 'SUCCESS'; | ||
OK | ||
// OK | ||
if (process.env.DEV_TOOLS) { | ||
@@ -157,3 +157,3 @@ const TrovContractAPIUnversionedStatusStatusResponseValidation = Validators.TrovContractAPIUnversionedStatusStatusResponse.validate(parsedBody); | ||
status = 'FAILURE'; | ||
An unexpected error has occurred. | ||
// An unexpected error has occurred. | ||
if (process.env.DEV_TOOLS) { | ||
@@ -160,0 +160,0 @@ const UnexpectedErrorExceptionValidation = Validators.UnexpectedErrorException.validate(parsedBody); |
@@ -81,3 +81,3 @@ | ||
status = 'SUCCESS'; | ||
OK | ||
// OK | ||
if (process.env.DEV_TOOLS) { | ||
@@ -94,3 +94,3 @@ const TrovCommonModelProfileProfileValidation = Validators.TrovCommonModelProfileProfile.validate(parsedBody); | ||
status = 'FAILURE'; | ||
An unexpected error has occurred. | ||
// An unexpected error has occurred. | ||
if (process.env.DEV_TOOLS) { | ||
@@ -177,3 +177,3 @@ const UnexpectedErrorExceptionValidation = Validators.UnexpectedErrorException.validate(parsedBody); | ||
status = 'SUCCESS'; | ||
OK | ||
// OK | ||
if (process.env.DEV_TOOLS) { | ||
@@ -194,3 +194,4 @@ const TrovCommonModelProfileProfileValidation = Validators.TrovCommonModelProfileProfile.validate(parsedBody); | ||
case 'CustomerAddressNotSupportedException': | ||
The customer address is valid, but the address is not supported. | ||
// The customer address is valid, but the address is not | ||
// supported. | ||
if (process.env.DEV_TOOLS) { | ||
@@ -202,3 +203,3 @@ Validators.CustomerAddressNotSupportedException.assert(parsedBody); | ||
case 'CustomerAgeNotSupportedException': | ||
The customer has an age that is not supported. | ||
// The customer has an age that is not supported. | ||
if (process.env.DEV_TOOLS) { | ||
@@ -210,3 +211,3 @@ Validators.CustomerAgeNotSupportedException.assert(parsedBody); | ||
case 'CustomerProfileInformationMissingException': | ||
The customer profile is missing information. | ||
// The customer profile is missing information. | ||
if (process.env.DEV_TOOLS) { | ||
@@ -232,3 +233,3 @@ Validators.CustomerProfileInformationMissingException.assert(parsedBody); | ||
case 'StateOfResidenceNotSupportedException': | ||
Customer does not reside in an active US state. | ||
// Customer does not reside in an active US state. | ||
if (process.env.DEV_TOOLS) { | ||
@@ -240,3 +241,3 @@ Validators.StateOfResidenceNotSupportedException.assert(parsedBody); | ||
case 'UnexpectedErrorException': | ||
An unexpected error has occurred. | ||
// An unexpected error has occurred. | ||
if (process.env.DEV_TOOLS) { | ||
@@ -325,3 +326,3 @@ Validators.UnexpectedErrorException.assert(parsedBody); | ||
status = 'SUCCESS'; | ||
OK | ||
// OK | ||
if (process.env.DEV_TOOLS) { | ||
@@ -342,3 +343,3 @@ const TrovCommonModelProfileProfileValidation = Validators.TrovCommonModelProfileProfile.validate(parsedBody); | ||
case 'ArgumentException': | ||
The user id is an invalid format. | ||
// The user id is an invalid format. | ||
if (process.env.DEV_TOOLS) { | ||
@@ -350,3 +351,3 @@ Validators.ArgumentException.assert(parsedBody); | ||
case 'UnsupportedImageException': | ||
The file was not a supported image. | ||
// The file was not a supported image. | ||
if (process.env.DEV_TOOLS) { | ||
@@ -367,4 +368,4 @@ Validators.UnsupportedImageException.assert(parsedBody); | ||
status = 'FAILURE'; | ||
The user does not have access to update the profile photo. The customer does not | ||
exist. | ||
// The user does not have access to update the profile photo. The | ||
// customer does not exist. | ||
if (process.env.DEV_TOOLS) { | ||
@@ -381,3 +382,3 @@ const DocumentAccessExceptionValidation = Validators.DocumentAccessException.validate(parsedBody); | ||
status = 'FAILURE'; | ||
An unexpected error has occurred. | ||
// An unexpected error has occurred. | ||
if (process.env.DEV_TOOLS) { | ||
@@ -461,3 +462,3 @@ const UnexpectedErrorExceptionValidation = Validators.UnexpectedErrorException.validate(parsedBody); | ||
status = 'SUCCESS'; | ||
OK | ||
// OK | ||
if (process.env.DEV_TOOLS) { | ||
@@ -478,3 +479,3 @@ const TrovCommonModelProfileProfileValidation = Validators.TrovCommonModelProfileProfile.validate(parsedBody); | ||
case 'ArgumentException': | ||
The user id is an invalid format. | ||
// The user id is an invalid format. | ||
if (process.env.DEV_TOOLS) { | ||
@@ -486,3 +487,3 @@ Validators.ArgumentException.assert(parsedBody); | ||
case 'UnsupportedImageException': | ||
The file was not a supported image. | ||
// The file was not a supported image. | ||
if (process.env.DEV_TOOLS) { | ||
@@ -503,4 +504,4 @@ Validators.UnsupportedImageException.assert(parsedBody); | ||
status = 'FAILURE'; | ||
The user does not have access to update the background photo. The customer does | ||
not exist. | ||
// The user does not have access to update the background photo. The | ||
// customer does not exist. | ||
if (process.env.DEV_TOOLS) { | ||
@@ -517,3 +518,3 @@ const DocumentAccessExceptionValidation = Validators.DocumentAccessException.validate(parsedBody); | ||
status = 'FAILURE'; | ||
An unexpected error has occurred. | ||
// An unexpected error has occurred. | ||
if (process.env.DEV_TOOLS) { | ||
@@ -520,0 +521,0 @@ const UnexpectedErrorExceptionValidation = Validators.UnexpectedErrorException.validate(parsedBody); |
@@ -67,3 +67,3 @@ | ||
status = 'SUCCESS'; | ||
OK | ||
// OK | ||
if (process.env.DEV_TOOLS) { | ||
@@ -80,3 +80,3 @@ const TrovContractAPIUnversionedStatusStatusResponseValidation = Validators.TrovContractAPIUnversionedStatusStatusResponse.validate(parsedBody); | ||
status = 'FAILURE'; | ||
An unexpected error has occurred. | ||
// An unexpected error has occurred. | ||
if (process.env.DEV_TOOLS) { | ||
@@ -148,3 +148,3 @@ const UnexpectedErrorExceptionValidation = Validators.UnexpectedErrorException.validate(parsedBody); | ||
status = 'SUCCESS'; | ||
OK | ||
// OK | ||
if (process.env.DEV_TOOLS) { | ||
@@ -161,3 +161,3 @@ const TrovContractAPIUnversionedStatusStatusResponseValidation = Validators.TrovContractAPIUnversionedStatusStatusResponse.validate(parsedBody); | ||
status = 'FAILURE'; | ||
An unexpected error has occurred. | ||
// An unexpected error has occurred. | ||
if (process.env.DEV_TOOLS) { | ||
@@ -164,0 +164,0 @@ const UnexpectedErrorExceptionValidation = Validators.UnexpectedErrorException.validate(parsedBody); |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4865619
32428