diff --git a/bin/configs/wsdl-spec.yaml b/bin/configs/wsdl-spec.yaml new file mode 100644 index 00000000000..2674412251d --- /dev/null +++ b/bin/configs/wsdl-spec.yaml @@ -0,0 +1,6 @@ +generatorName: wsdl +outputDir: samples/documentation/wsdl +inputSpec: modules/openapi-generator/src/test/resources/3_0/wsdl/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/wsdl +additionalProperties: + hideGenerationTimestamp: "true" diff --git a/docs/generators/fsharp-functions.md b/docs/generators/fsharp-functions.md index bb16f39fa77..2a81000a7fb 100644 --- a/docs/generators/fsharp-functions.md +++ b/docs/generators/fsharp-functions.md @@ -22,7 +22,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| |sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sourceFolder|source folder for generated code| |OpenAPI/src| +|sourceFolder|source folder for generated code| |OpenAPI\src| ## IMPORT MAPPING diff --git a/docs/generators/fsharp-giraffe-server.md b/docs/generators/fsharp-giraffe-server.md index f374168aa71..66150dbec0d 100644 --- a/docs/generators/fsharp-giraffe-server.md +++ b/docs/generators/fsharp-giraffe-server.md @@ -19,7 +19,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |packageVersion|F# package version.| |1.0.0| |returnICollection|Return ICollection<T> instead of the concrete type.| |false| |sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sourceFolder|source folder for generated code| |OpenAPI/src| +|sourceFolder|source folder for generated code| |OpenAPI\src| |useCollection|Deserialize array types to Collection<T> instead of List<T>.| |false| |useDateTimeOffset|Use DateTimeOffset to model date-time properties| |false| |useSwashbuckle|Uses the Swashbuckle.AspNetCore NuGet package for documentation.| |false| diff --git a/docs/generators/java-inflector.md b/docs/generators/java-inflector.md index 373bc61861b..131b09f3f90 100644 --- a/docs/generators/java-inflector.md +++ b/docs/generators/java-inflector.md @@ -48,7 +48,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |snapshotVersion|Uses a SNAPSHOT version.|
**true**
Use a SnapShot Version
**false**
Use a Release Version
|null| |sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| |sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sourceFolder|source folder for generated code| |src/gen/java| +|sourceFolder|source folder for generated code| |src\gen\java| |withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| ## IMPORT MAPPING diff --git a/docs/generators/jaxrs-cxf-client.md b/docs/generators/jaxrs-cxf-client.md index fb3547c920d..25d03ea104b 100644 --- a/docs/generators/jaxrs-cxf-client.md +++ b/docs/generators/jaxrs-cxf-client.md @@ -48,7 +48,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |snapshotVersion|Uses a SNAPSHOT version.|
**true**
Use a SnapShot Version
**false**
Use a Release Version
|null| |sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| |sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sourceFolder|source folder for generated code| |src/gen/java| +|sourceFolder|source folder for generated code| |src\gen\java| |useBeanValidation|Use BeanValidation API annotations| |false| |useGenericResponse|Use generic response| |false| |useGzipFeatureForTests|Use Gzip Feature for tests| |false| diff --git a/docs/generators/swift5.md b/docs/generators/swift5.md index bace7f1f049..2846d6de2b9 100644 --- a/docs/generators/swift5.md +++ b/docs/generators/swift5.md @@ -36,10 +36,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl |responseAs|Optionally use libraries to manage response. Currently PromiseKit, RxSwift, Result, Combine are available.| |null| |sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| |sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|swiftPackagePath|Set a custom source path instead of OpenAPIClient/Classes/OpenAPIs.| |null| +|swiftPackagePath|Set a custom source path instead of OpenAPIClient\Classes\OpenAPIs.| |null| |swiftUseApiNamespace|Flag to make all the API classes inner-class of {{projectName}}API| |null| |useBacktickEscapes|Escape reserved words using backticks (default: false)| |false| -|useSPMFileStructure|Use SPM file structure and set the source path to Sources/{{projectName}} (default: false).| |null| +|useSPMFileStructure|Use SPM file structure and set the source path to Sources\{{projectName}} (default: false).| |null| ## IMPORT MAPPING diff --git a/docs/generators/wsdl.md b/docs/generators/wsdl.md new file mode 100644 index 00000000000..46d30e12393 --- /dev/null +++ b/docs/generators/wsdl.md @@ -0,0 +1,150 @@ +--- +title: Config Options for wsdl +sidebar_label: wsdl +--- + +These options may be applied as additional-properties (cli) or configOptions (plugins). Refer to [configuration docs](https://openapi-generator.tech/docs/configuration) for more details. + +| Option | Description | Values | Default | +| ------ | ----------- | ------ | ------- | +|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
|true| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|hostname|the hostname of the service| |null| +|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|serviceName|service name for the wsdl| |null| +|soapPath|basepath of the soap services| |null| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + + + +## RESERVED WORDS + + + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✗|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension +|MockServer|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✗|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✓|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✓|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✓|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✓|OAS2,OAS3 +|ApiKey|✓|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✓|OAS3 +|OAuth2_Implicit|✓|OAS2,OAS3 +|OAuth2_Password|✓|OAS2,OAS3 +|OAuth2_ClientCredentials|✓|OAS2,OAS3 +|OAuth2_AuthorizationCode|✓|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/WsdlGeneratorCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/WsdlGeneratorCodegen.java new file mode 100644 index 00000000000..d6493b524cc --- /dev/null +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/WsdlGeneratorCodegen.java @@ -0,0 +1,264 @@ +package org.openapitools.codegen.languages; + +import io.swagger.v3.oas.models.OpenAPI; +import io.swagger.v3.oas.models.info.Info; + +import java.io.File; +import java.text.Normalizer; +import java.util.List; +import java.util.ArrayList; +import java.util.Locale; +import java.util.Map; + +import org.openapitools.codegen.CliOption; +import org.openapitools.codegen.CodegenConfig; +import org.openapitools.codegen.CodegenModel; +import org.openapitools.codegen.CodegenOperation; +import org.openapitools.codegen.CodegenParameter; +import org.openapitools.codegen.CodegenProperty; +import org.openapitools.codegen.CodegenType; +import org.openapitools.codegen.DefaultCodegen; +import org.openapitools.codegen.SupportingFile; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class WsdlGeneratorCodegen extends DefaultCodegen implements CodegenConfig { + public static final String PROJECT_NAME = "projectName"; + + static final Logger LOGGER = LoggerFactory.getLogger(WsdlGeneratorCodegen.class); + + public CodegenType getTag() { + return CodegenType.DOCUMENTATION; + } + + public String getName() { + return "wsdl"; + } + + public String getHelp() { + return "Generates a wsdl-spec documentation."; + } + + public WsdlGeneratorCodegen() { + super(); + + outputFolder = "generated-code" + File.separator + "wsdl-spec"; + embeddedTemplateDir = templateDir = "wsdl"; + apiPackage = "Apis"; + modelPackage = "Models"; + + cliOptions.add(new CliOption("hostname", "the hostname of the service")); + cliOptions.add(new CliOption("soapPath", "basepath of the soap services")); + cliOptions.add(new CliOption("serviceName", "service name for the wsdl")); + + additionalProperties.put("hostname", "localhost"); + additionalProperties.put("soapPath", "soap"); + additionalProperties.put("serviceName", "ServiceV1"); + + supportingFiles.add(new SupportingFile("wsdl-converter.mustache", "", "service.wsdl")); + supportingFiles.add(new SupportingFile("jaxb-customization.mustache", "", + "jaxb-customization.xml")); + } + + public void preprocessOpenAPI(OpenAPI openAPI) { + Info info = openAPI.getInfo(); + + String title = info.getTitle(); + String description = info.getDescription(); + + info.setDescription(this.processOpenapiSpecDescription(description)); + info.setTitle(this.escapeTitle(title)); + } + + private String escapeTitle(String title) { + // strip umlauts etc. + final String normalizedTitle = Normalizer.normalize(title, Normalizer.Form.NFD) + .replaceAll("[^\\p{ASCII}]", ""); + return super.escapeUnsafeCharacters(normalizedTitle); + } + + public String processOpenapiSpecDescription(String description) { + if (description != null) { + return description.replaceAll("\\s+", " "); + } else { + return "No description provided"; + } + } + + @Override + public Map postProcessOperationsWithModels(Map objs, + List allModels) { + + Map operations = (Map) objs.get("operations"); + List operationList = (List) operations.get("operation"); + for (CodegenOperation op : operationList) { + op.operationId = this.generateOperationId(op); + + // for xml compliant primitives, lowercase dataType of openapi + for (CodegenParameter param : op.allParams) { + Map paramVendorExtensions = param.vendorExtensions; + + normalizeDataType(param); + + // prevent default="null" in wsdl-tag if no default was specified for a param + if ("null".equals(param.defaultValue) || param.defaultValue == null) { + paramVendorExtensions.put("x-param-has-defaultvalue", false); + } else { + paramVendorExtensions.put("x-param-has-defaultvalue", true); + } + + // check if param has a minimum or maximum number or lenght + if (param.minimum != null + || param.maximum != null + || param.minLength != null + || param.maxLength != null) { + paramVendorExtensions.put("x-param-has-minormax", true); + } else { + paramVendorExtensions.put("x-param-has-minormax", false); + } + + // if param is enum, uppercase 'baseName' to have a reference to wsdl simpletype + if (param.isEnum) { + char[] c = param.baseName.toCharArray(); + c[0] = Character.toUpperCase(c[0]); + param.baseName = new String(c); + } + } + + for (CodegenParameter param : op.bodyParams) { + normalizeDataType(param); + } + for (CodegenParameter param : op.pathParams) { + normalizeDataType(param); + } + for (CodegenParameter param : op.queryParams) { + normalizeDataType(param); + } + for (CodegenParameter param : op.formParams) { + normalizeDataType(param); + } + } + + return objs; + } + + private void normalizeDataType(CodegenParameter param) { + if (param.isPrimitiveType) { + param.dataType = param.dataType.toLowerCase(Locale.getDefault()); + } + if (param.dataFormat != null && param.dataFormat.equalsIgnoreCase("date")) { + param.dataType = "date"; + } + if (param.dataFormat != null && param.dataFormat.equalsIgnoreCase("date-time")) { + param.dataType = "dateTime"; + } + if (param.dataFormat != null && param.dataFormat.equalsIgnoreCase("uuid")) { + param.dataType = "string"; + } + } + + @Override + public Map postProcessModels(Map objs) { + List models = (List) objs.get("models"); + + for (Object mo : models) { + Map mod = (Map) mo; + CodegenModel model = (CodegenModel) mod.get("model"); + Map modelVendorExtensions = model.getVendorExtensions(); + + /* check if model is a model with no properties + * Used in the mustache template to ensure that no complextype is created + * if model is just a schema with an enum defined in the openapi specification + */ + if (model.allowableValues != null) { + modelVendorExtensions.put("x-is-openapimodel-enum", true); + } else { + modelVendorExtensions.put("x-is-openapimodel-enum", false); + } + + for (CodegenProperty var : model.vars) { + Map propertyVendorExtensions = var.getVendorExtensions(); + + // lowercase basetypes if openapitype is string + if (var.openApiType == "string") { + char[] c = var.baseType.toCharArray(); + c[0] = Character.toLowerCase(c[0]); + var.baseType = new String(c); + } + // if string enum, uppercase 'name' to have a reference to wsdl simpletype + if (var.isEnum) { + char[] c = var.name.toCharArray(); + c[0] = Character.toUpperCase(c[0]); + var.name = new String(c); + } + + // prevent default="null" in wsdl-tag if no default was specified for a property + if ("null".equals(var.defaultValue) || var.defaultValue == null) { + propertyVendorExtensions.put("x-prop-has-defaultvalue", false); + } else { + propertyVendorExtensions.put("x-prop-has-defaultvalue", true); + } + + // check if model property has a minimum or maximum number or lenght + if (var.minimum != null + || var.maximum != null + || var.minLength != null + || var.maxLength != null) { + propertyVendorExtensions.put("x-prop-has-minormax", true); + } else { + propertyVendorExtensions.put("x-prop-has-minormax", false); + } + } + } + return super.postProcessModelsEnum(objs); + } + + public String generateOperationId(CodegenOperation op) { + String newOperationid = this.lowerCaseStringExceptFirstLetter(op.httpMethod); + String[] pathElements = op.path.split("/"); + List pathParameters = new ArrayList(); + + for (int i = 0; i < pathElements.length; i++) { + if (pathElements[i].contains("{")) { + pathParameters.add(pathElements[i]); + pathElements[i] = ""; + } + if (pathElements[i].length() > 0) { + newOperationid = newOperationid + this.lowerCaseStringExceptFirstLetter(pathElements[i]); + } + } + + if (pathParameters.size() > 0) { + for (int i = 0; i < pathParameters.size(); i++) { + String pathParameter = pathParameters.get(i); + pathParameter = this.lowerCaseStringExceptFirstLetter(pathParameter + .substring(1, pathParameter.length() - 1)); + if (i == 0) { + newOperationid = newOperationid + "By" + pathParameter; + } else { + newOperationid = newOperationid + "And" + pathParameter; + } + } + } + return newOperationid; + } + + public String lowerCaseStringExceptFirstLetter(String value) { + String newOperationid = value.toLowerCase(Locale.getDefault()); + return newOperationid.substring(0, 1).toUpperCase(Locale.getDefault()) + + newOperationid.substring(1); + } + + @Override + public String escapeQuotationMark(String input) { + // just return the original string + return input; + } + + @Override + public String escapeUnsafeCharacters(String input) { + // just return the original string + return input; + } +} diff --git a/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig b/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig index dcc8eacbc8a..6a0ecf94cba 100644 --- a/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig +++ b/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig @@ -134,3 +134,4 @@ org.openapitools.codegen.languages.TypeScriptNodeClientCodegen org.openapitools.codegen.languages.TypeScriptReduxQueryClientCodegen org.openapitools.codegen.languages.TypeScriptRxjsClientCodegen org.openapitools.codegen.languages.GoEchoServerCodegen +org.openapitools.codegen.languages.WsdlGeneratorCodegen diff --git a/modules/openapi-generator/src/main/resources/wsdl/jaxb-customization.mustache b/modules/openapi-generator/src/main/resources/wsdl/jaxb-customization.mustache new file mode 100644 index 00000000000..cfdd31b1b58 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/wsdl/jaxb-customization.mustache @@ -0,0 +1,50 @@ + + + + true + false + + {{#models}} + {{#model}} + {{^allOf}} + {{#vars}} + {{#isEnum}} + {{#baseType}} + + + {{#allowableValues}} + {{#enumVars}} + + {{/enumVars}} + {{/allowableValues}} + + + {{/baseType}} + {{/isEnum}} + {{/vars}} + {{/allOf}} + {{/model}} + {{/models}} + + {{#models}} + {{#model}} + {{^vars}} + + + {{#allowableValues}} + {{#enumVars}} + + {{/enumVars}} + {{/allowableValues}} + + + {{/vars}} + {{/model}} + {{/models}} + + diff --git a/modules/openapi-generator/src/main/resources/wsdl/wsdl-converter.mustache b/modules/openapi-generator/src/main/resources/wsdl/wsdl-converter.mustache new file mode 100644 index 00000000000..c136126eb5a --- /dev/null +++ b/modules/openapi-generator/src/main/resources/wsdl/wsdl-converter.mustache @@ -0,0 +1,348 @@ + + + + + {{#apiInfo}} + {{#apis}} + {{#operations}} + {{#operation}} + + + {{#responses}} + {{#is4xx}} + + + {{message}} + + + {{/is4xx}} + {{#is5xx}} + + + {{message}} + + + {{/is5xx}} + {{/responses}} + {{/operation}} + {{/operations}} + {{/apis}} + {{/apiInfo}} + {{#models}} + {{#model}} + {{^vendorExtensions.x-is-openapimodel-enum}} + + {{#description}} + + {{description}} + + {{/description}} + + {{#vars}} + {{#vendorExtensions.x-prop-has-minormax}} + + + {{#description}} + + {{description}} + + {{/description}} + + {{#maximum}} + + {{/maximum}} + {{#minimum}} + + {{/minimum}} + {{#maxLength}} + + {{/maxLength}} + {{#minLength}} + + {{/minLength}} + + + + {{/vendorExtensions.x-prop-has-minormax}} + {{^vendorExtensions.x-prop-has-minormax}} + {{#isContainer}} + + {{/isContainer}} + {{^isContainer}} + + {{/isContainer}} + {{#description}} + + {{description}} + + + {{/description}} + {{/vendorExtensions.x-prop-has-minormax}} + {{/vars}} + + + {{/vendorExtensions.x-is-openapimodel-enum}} + {{/model}} + {{/models}} + {{#models}} + {{#model}} + {{^allOf}} + {{#vars}} + {{#isEnum}} + {{#baseType}} + + {{#description}} + + {{description}} + + {{/description}} + + {{#allowableValues}} + {{#enumVars}} + + {{/enumVars}} + {{/allowableValues}} + + + {{/baseType}} + {{/isEnum}} + {{/vars}} + {{/allOf}} + {{/model}} + {{/models}} + {{#models}} + {{#model}} + {{^vars}} + + {{#description}} + + {{description}} + + {{/description}} + + {{#allowableValues}} + {{#enumVars}} + + {{/enumVars}} + {{/allowableValues}} + + + {{/vars}} + {{/model}} + {{/models}} + {{#apiInfo}} + {{#apis}} + {{#operations}} + {{#operation}} + {{#allParams}} + {{#isEnum}} + + + {{#allowableValues}} + {{#enumVars}} + + {{/enumVars}} + {{/allowableValues}} + + + {{/isEnum}} + {{/allParams}} + {{/operation}} + {{/operations}} + {{/apis}} + {{/apiInfo}} + {{#apiInfo}} + {{#apis}} + {{#operations}} + {{#operation}} + {{#hasParams}} + + + {{#allParams}} + {{#vendorExtensions.x-param-has-minormax}} + + + {{#description}} + + {{description}} + + {{/description}} + + {{#maximum}} + + {{/maximum}} + {{#minimum}} + + {{/minimum}} + {{#maxLength}} + + {{/maxLength}} + {{#minLength}} + + {{/minLength}} + + + + {{/vendorExtensions.x-param-has-minormax}} + {{^vendorExtensions.x-param-has-minormax}} + + {{#description}} + + {{description}} + + + {{/description}} + {{/vendorExtensions.x-param-has-minormax}} + {{/allParams}} + + + {{/hasParams}} + {{^hasParams}} + + {{/hasParams}} + {{#responses}} + {{^is4xx}} + {{^is5xx}} + + + {{#message}} + + + {{message}} + + + {{/message}} + {{^message}} + + {{/message}} + + + {{/is5xx}} + {{/is4xx}} + {{/responses}} + {{/operation}} + {{/operations}} + {{/apis}} + {{/apiInfo}} + + + {{#apiInfo}} + {{#apis}} + {{#operations}} + {{#operation}} + + + + {{#responses}} + {{#is2xx}} + + + + {{/is2xx}} + {{#isDefault}} + + + + {{/isDefault}} + {{#is4xx}} + + + + {{/is4xx}} + {{#is5xx}} + + + + {{/is5xx}} + {{/responses}} + {{/operation}} + {{/operations}} + {{/apis}} + {{/apiInfo}} + + {{#apiInfo}} + {{#apis}} + {{#operations}} + {{#operation}} + + {{#notes}} + {{notes}} + {{/notes}} + {{^notes}} + {{#summary}} + {{summary}} + {{/summary}} + {{/notes}} + + {{#responses}} + {{^is4xx}} + {{^is5xx}} + + {{#message}} + {{message}} + + {{/message}} + {{/is5xx}} + {{/is4xx}} + {{#is4xx}} + + {{#message}} + {{message}} + + {{/message}} + {{/is4xx}} + {{#is5xx}} + + {{#message}} + {{message}} + + {{/message}} + {{/is5xx}} + {{/responses}} + + {{/operation}} + {{/operations}} + {{/apis}} + {{/apiInfo}} + + + + {{#apiInfo}} + {{#apis}} + {{#operations}} + {{#operation}} + + + + + + {{#responses}} + {{#is2xx}} + + + + {{/is2xx}} + {{#is4xx}} + + + + {{/is4xx}} + {{#is5xx}} + + + + {{/is5xx}} + {{/responses}} + + {{/operation}} + {{/operations}} + {{/apis}} + {{/apiInfo}} + + + {{appDescription}} + + + + + \ No newline at end of file diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/wsdl/WsdlGeneratorTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/wsdl/WsdlGeneratorTest.java new file mode 100644 index 00000000000..439165ac4c4 --- /dev/null +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/wsdl/WsdlGeneratorTest.java @@ -0,0 +1,269 @@ +package org.openapitools.codegen.wsdl; + +import io.swagger.v3.oas.models.OpenAPI; +import io.swagger.v3.oas.models.Operation; + +import java.io.File; +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Paths; +import java.util.List; + +import org.apache.commons.io.FileUtils; + +import org.openapitools.codegen.ClientOptInput; +import org.openapitools.codegen.CodegenOperation; +import org.openapitools.codegen.DefaultGenerator; +import org.openapitools.codegen.TestUtils; +import org.openapitools.codegen.languages.WsdlGeneratorCodegen; + +import org.testng.Assert; +import org.testng.annotations.AfterClass; +import org.testng.annotations.BeforeClass; +import org.testng.annotations.Test; + +import static org.openapitools.codegen.TestUtils.assertFileContains; +import static org.openapitools.codegen.TestUtils.ensureContainsFile; + +public class WsdlGeneratorTest { + private OpenAPI openAPI; + private File outputDirectory; + private String outputPath; + private List listOfFiles; + + @BeforeClass + public void setUp() throws IOException { + this.openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/wsdl/petstore.yaml"); + this.outputDirectory = Files.createTempDirectory("test").toFile().getCanonicalFile(); + this.outputPath = this.outputDirectory.getAbsolutePath().replace('\\', '/'); + + WsdlGeneratorCodegen codegen = new WsdlGeneratorCodegen(); + codegen.setOutputDir(this.outputDirectory.getAbsolutePath()); + + ClientOptInput input = new ClientOptInput() + .openAPI(this.openAPI) + .config(codegen); + + DefaultGenerator generator = new DefaultGenerator(); + this.listOfFiles = generator.opts(input).generate(); + } + + @Test(description = "ensure that the operationid has been generated correctly") + public void testOperationIdGeneration() { + final OpenAPI openAPI = this.openAPI; + WsdlGeneratorCodegen codegen = new WsdlGeneratorCodegen(); + codegen.setOpenAPI(openAPI); + + String requestPathWithId = "/store/order/{orderId}"; + Operation textOperationGet = openAPI.getPaths().get(requestPathWithId).getGet(); + CodegenOperation opGet = codegen.fromOperation(requestPathWithId, "get", textOperationGet, null); + String newOperationIdWithId = codegen.generateOperationId(opGet); + + String requestPathWithoutId = "/store/order"; + Operation textOperationPost = openAPI.getPaths().get(requestPathWithoutId).getPost(); + CodegenOperation opPost = codegen.fromOperation(requestPathWithoutId, "post", textOperationPost, null); + String newOperationIdWithoutId = codegen.generateOperationId(opPost); + + Assert.assertEquals(newOperationIdWithId, "GetStoreOrderByOrderid"); + Assert.assertEquals(newOperationIdWithoutId, "PostStoreOrder"); + } + + @Test(description = "Ensure that passed strings are processed correcly by this method") + public void testLowerCaseStringExceptFirstLetter() { + WsdlGeneratorCodegen codegen = new WsdlGeneratorCodegen(); + String value = codegen.lowerCaseStringExceptFirstLetter("uploadPetByPathId"); + + Assert.assertEquals(value, "Uploadpetbypathid"); + } + + @Test(description = "Check if element tags has been created for an operation ") + public void testIfElementTagsExist() { + String xsElementRequestMessage = + ""; + String xsElementResponseMessage = + ""; + String xsElementErrorResponse = + " \n" + + " \n" + + " Invalid input\n" + + " \n" + + " \n"; + + assertFileContains(Paths.get(this.outputPath + "/service.wsdl"), xsElementRequestMessage); + assertFileContains(Paths.get(this.outputPath + "/service.wsdl"), xsElementResponseMessage); + assertFileContains(Paths.get(this.outputPath + "/service.wsdl"), xsElementErrorResponse); + } + + @Test(description = "Check if complexType input- and output-message has been created for an operation ") + public void testIfInputAndResponseMessageExist() { + String complexTypeRequestMessage = + " \n" + + " \n" + + " \n" + + " \n" + + " ID of pet to return\n" + + " \n" + + " \n" + + " \n" + + " \n"; + + String complexTypeResponseMessage = + " \n" + + " \n" + + " \n" + + " \n" + + " successful operation\n" + + " \n" + + " \n" + + " \n" + + " \n"; + + assertFileContains(Paths.get(this.outputPath + "/service.wsdl"), complexTypeRequestMessage); + assertFileContains(Paths.get(this.outputPath + "/service.wsdl"), complexTypeResponseMessage); + } + + @Test(description = + "Check if complexType RequestMessage with minimum and maximum restriction has been created for an operation ") + public void testIfRequestMessageMinimumExists() { + String complexTypeRequestMessageMinimum = + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " ID of pet that needs to be fetched\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n"; + + assertFileContains(Paths.get(this.outputPath + "/service.wsdl"), complexTypeRequestMessageMinimum); + } + + @Test(description = "Check if complexType model has been created for an openapi model schema") + public void testIfComplexTypeModelExists() { + String complexTypeModel = + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " pet status in the store\n" + + " \n" + + " \n" + + " \n" + + " \n"; + + assertFileContains(Paths.get(this.outputPath + "/service.wsdl"), complexTypeModel); + } + + @Test(description = "Check if message and part tags has been created for an operation ") + public void testIfMessageTagsAndContentExist() { + String messageRequestMessage = + " \n" + + " \n" + + " "; + + String messageError = + " \n" + + " \n" + + " \n"; + + assertFileContains(Paths.get(this.outputPath + "/service.wsdl"), messageRequestMessage); + assertFileContains(Paths.get(this.outputPath + "/service.wsdl"), messageError); + } + + @Test(description = "Check if portType tag and portType operation has been generated") + public void testIfPorttypeOperationExists() { + String portType = ""; + + String portTypeOperation = + " \n" + + " Returns a single pet\n" + + " \n" + + " \n" + + " successful operation\n" + + " \n" + + " \n" + + " Invalid ID supplied\n" + + " \n" + + " \n" + + " Pet not found\n" + + " \n" + + " \n"; + + assertFileContains(Paths.get(this.outputPath + "/service.wsdl"), portType); + assertFileContains(Paths.get(this.outputPath + "/service.wsdl"), portTypeOperation); + } + + @Test(description = "Check if portType tag and portType operation has been generated") + public void testIfBindingOperationExists() { + String binding = ""; + + String bindingOperation = + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n"; + + assertFileContains(Paths.get(this.outputPath + "/service.wsdl"), binding); + assertFileContains(Paths.get(this.outputPath + "/service.wsdl"), bindingOperation); + } + + @Test(description = "Ensure that all files have been correctly generated") + public void testFileGeneration() throws Exception { + Assert.assertEquals(this.listOfFiles.size(), 5); + ensureContainsFile(this.listOfFiles, this.outputDirectory, ".openapi-generator-ignore"); + ensureContainsFile(this.listOfFiles, this.outputDirectory, ".openapi-generator/FILES"); + ensureContainsFile(this.listOfFiles, this.outputDirectory, ".openapi-generator/VERSION"); + ensureContainsFile(this.listOfFiles, this.outputDirectory, "service.wsdl"); + ensureContainsFile(this.listOfFiles, this.outputDirectory, "jaxb-customization.xml"); + } + + @Test(description = "Ensure that default description is set if it doesn't exist") + public void testOpenapiDescriptionWasNotProvided() throws IOException { + final OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/ping.yaml"); + File outputDirectory = Files.createTempDirectory("test").toFile().getCanonicalFile(); + String outputPath = this.outputDirectory.getAbsolutePath().replace('\\', '/'); + + WsdlGeneratorCodegen codegen = new WsdlGeneratorCodegen(); + codegen.setOutputDir(this.outputDirectory.getAbsolutePath()); + + ClientOptInput input = new ClientOptInput().openAPI(openAPI).config(codegen); + + DefaultGenerator generator = new DefaultGenerator(); + generator.opts(input).generate(); + + String value = "No description provided"; + assertFileContains(Paths.get(outputPath + "/service.wsdl"), value); + + FileUtils.deleteDirectory(outputDirectory); + } + + + @AfterClass + public void cleanUp() throws Exception { + // Delete temp folder + FileUtils.deleteDirectory(this.outputDirectory); + } +} diff --git a/modules/openapi-generator/src/test/resources/3_0/wsdl/petstore.yaml b/modules/openapi-generator/src/test/resources/3_0/wsdl/petstore.yaml new file mode 100644 index 00000000000..83ccdf1c611 --- /dev/null +++ b/modules/openapi-generator/src/test/resources/3_0/wsdl/petstore.yaml @@ -0,0 +1,728 @@ +openapi: 3.0.1 +info: + title: Swagger Petstore + description: 'This is a sample server Petstore server. You can find out more about Swagger + at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For + this sample, you can use the api key `special-key` to test the authorization filters.' + termsOfService: http://swagger.io/terms/ + contact: + email: apiteam@swagger.io + license: + name: Apache 2.0 + url: http://www.apache.org/licenses/LICENSE-2.0.html + version: 1.0.0 +externalDocs: + description: Find out more about Swagger + url: http://swagger.io +servers: +- url: https://petstore.swagger.io/v2 +- url: http://petstore.swagger.io/v2 +tags: +- name: pet + description: Everything about your Pets + externalDocs: + description: Find out more + url: http://swagger.io +- name: store + description: Access to Petstore orders +- name: user + description: Operations about user + externalDocs: + description: Find out more about our store + url: http://swagger.io +paths: + /pet: + put: + tags: + - pet + summary: Update an existing pet + operationId: updatePet + requestBody: + description: Pet object that needs to be added to the store + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + application/xml: + schema: + $ref: '#/components/schemas/Pet' + required: true + responses: + 400: + description: Invalid ID supplied + content: {} + 404: + description: Pet not found + content: {} + 405: + description: Validation exception + content: {} + security: + - petstore_auth: + - write:pets + - read:pets + x-codegen-request-body-name: body + post: + tags: + - pet + summary: Add a new pet to the store + operationId: addPet + requestBody: + description: Pet object that needs to be added to the store + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + application/xml: + schema: + $ref: '#/components/schemas/Pet' + required: true + responses: + 405: + description: Invalid input + content: {} + security: + - petstore_auth: + - write:pets + - read:pets + x-codegen-request-body-name: body + /pet/findByStatus: + get: + tags: + - pet + summary: Finds Pets by status + description: Multiple status values can be provided with comma separated strings + operationId: findPetsByStatus + parameters: + - name: status + in: query + description: Status values that need to be considered for filter + required: true + style: form + explode: true + schema: + type: array + items: + type: string + default: available + enum: + - available + - pending + - sold + responses: + 200: + description: successful operation + content: + application/xml: + schema: + type: array + items: + $ref: '#/components/schemas/Pet' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Pet' + 400: + description: Invalid status value + content: {} + security: + - petstore_auth: + - write:pets + - read:pets + /pet/findByTags: + get: + tags: + - pet + summary: Finds Pets by tags + description: Muliple tags can be provided with comma separated strings. Use tag1, + tag2, tag3 for testing. + operationId: findPetsByTags + parameters: + - name: tags + in: query + description: Tags to filter by + required: true + style: form + explode: true + schema: + type: array + items: + type: string + responses: + 200: + description: successful operation + content: + application/xml: + schema: + type: array + items: + $ref: '#/components/schemas/Pet' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Pet' + 400: + description: Invalid tag value + content: {} + deprecated: true + security: + - petstore_auth: + - write:pets + - read:pets + /pet/{petId}: + get: + tags: + - pet + summary: Find pet by ID + description: Returns a single pet + operationId: getPetById + parameters: + - name: petId + in: path + description: ID of pet to return + required: true + schema: + type: integer + format: int64 + responses: + 200: + description: successful operation + content: + application/xml: + schema: + $ref: '#/components/schemas/Pet' + application/json: + schema: + $ref: '#/components/schemas/Pet' + 400: + description: Invalid ID supplied + content: {} + 404: + description: Pet not found + content: {} + security: + - api_key: [] + post: + tags: + - pet + summary: Updates a pet in the store with form data + operationId: updatePetWithForm + parameters: + - name: petId + in: path + description: ID of pet that needs to be updated + required: true + schema: + type: integer + format: int64 + requestBody: + content: + application/x-www-form-urlencoded: + schema: + properties: + name: + type: string + description: Updated name of the pet + status: + type: string + description: Updated status of the pet + responses: + 405: + description: Invalid input + content: {} + security: + - petstore_auth: + - write:pets + - read:pets + delete: + tags: + - pet + summary: Deletes a pet + operationId: deletePet + parameters: + - name: api_key + in: header + schema: + type: string + - name: petId + in: path + description: Pet id to delete + required: true + schema: + type: integer + format: int64 + responses: + 400: + description: Invalid ID supplied + content: {} + 404: + description: Pet not found + content: {} + security: + - petstore_auth: + - write:pets + - read:pets + /pet/{petId}/uploadImage: + post: + tags: + - pet + summary: uploads an image + operationId: uploadFile + parameters: + - name: petId + in: path + description: ID of pet to update + required: true + schema: + type: integer + format: int64 + requestBody: + content: + multipart/form-data: + schema: + properties: + additionalMetadata: + type: string + description: Additional data to pass to server + file: + type: string + description: file to upload + format: binary + responses: + 200: + description: successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + security: + - petstore_auth: + - write:pets + - read:pets + /store/inventory: + get: + tags: + - store + summary: Returns pet inventories by status + description: Returns a map of status codes to quantities + operationId: getInventory + responses: + 200: + description: successful operation + content: + application/json: + schema: + type: object + additionalProperties: + type: integer + format: int32 + security: + - api_key: [] + /store/order: + post: + tags: + - store + summary: Place an order for a pet + operationId: placeOrder + requestBody: + description: order placed for purchasing the pet + content: + '*/*': + schema: + $ref: '#/components/schemas/Order' + required: true + responses: + 200: + description: successful operation + content: + application/xml: + schema: + $ref: '#/components/schemas/Order' + application/json: + schema: + $ref: '#/components/schemas/Order' + 400: + description: Invalid Order + content: {} + x-codegen-request-body-name: body + /store/order/{orderId}: + get: + tags: + - store + summary: Find purchase order by ID + description: For valid response try integer IDs with value >= 1 and <= 10. Other + values will generated exceptions + operationId: getOrderById + parameters: + - name: orderId + in: path + description: ID of pet that needs to be fetched + required: true + schema: + maximum: 10.0 + minimum: 1.0 + type: integer + format: int64 + responses: + 200: + description: successful operation + content: + application/xml: + schema: + $ref: '#/components/schemas/Order' + application/json: + schema: + $ref: '#/components/schemas/Order' + 400: + description: Invalid ID supplied + content: {} + 404: + description: Order not found + content: {} + delete: + tags: + - store + summary: Delete purchase order by ID + description: For valid response try integer IDs with positive integer value. Negative + or non-integer values will generate API errors + operationId: deleteOrder + parameters: + - name: orderId + in: path + description: ID of the order that needs to be deleted + required: true + schema: + minimum: 1.0 + type: integer + format: int64 + responses: + 400: + description: Invalid ID supplied + content: {} + 404: + description: Order not found + content: {} + /user: + post: + tags: + - user + summary: Create user + description: This can only be done by the logged in user. + operationId: createUser + requestBody: + description: Created user object + content: + '*/*': + schema: + $ref: '#/components/schemas/User' + required: true + responses: + default: + description: successful operation + content: {} + x-codegen-request-body-name: body + /user/createWithArray: + post: + tags: + - user + summary: Creates list of users with given input array + operationId: createUsersWithArrayInput + requestBody: + description: List of user object + content: + '*/*': + schema: + type: array + items: + $ref: '#/components/schemas/User' + required: true + responses: + default: + description: successful operation + content: {} + x-codegen-request-body-name: body + /user/createWithList: + post: + tags: + - user + summary: Creates list of users with given input array + operationId: createUsersWithListInput + requestBody: + description: List of user object + content: + '*/*': + schema: + type: array + items: + $ref: '#/components/schemas/User' + required: true + responses: + default: + description: successful operation + content: {} + x-codegen-request-body-name: body + /user/login: + get: + tags: + - user + summary: Logs user into the system + operationId: loginUser + parameters: + - name: username + in: query + description: The user name for login + required: true + schema: + type: string + - name: password + in: query + description: The password for login in clear text + required: true + schema: + type: string + responses: + 200: + description: successful operation + headers: + X-Rate-Limit: + description: calls per hour allowed by the user + schema: + type: integer + format: int32 + X-Expires-After: + description: date in UTC when token expires + schema: + type: string + format: date-time + content: + application/xml: + schema: + type: string + application/json: + schema: + type: string + 400: + description: Invalid username/password supplied + content: {} + /user/logout: + get: + tags: + - user + summary: Logs out current logged in user session + operationId: logoutUser + responses: + default: + description: successful operation + content: {} + /user/{username}: + get: + tags: + - user + summary: Get user by user name + operationId: getUserByName + parameters: + - name: username + in: path + description: 'The name that needs to be fetched. Use user1 for testing. ' + required: true + schema: + type: string + responses: + 200: + description: successful operation + content: + application/xml: + schema: + $ref: '#/components/schemas/User' + application/json: + schema: + $ref: '#/components/schemas/User' + 400: + description: Invalid username supplied + content: {} + 404: + description: User not found + content: {} + put: + tags: + - user + summary: Updated user + description: This can only be done by the logged in user. + operationId: updateUser + parameters: + - name: username + in: path + description: name that need to be updated + required: true + schema: + type: string + requestBody: + description: Updated user object + content: + '*/*': + schema: + $ref: '#/components/schemas/User' + required: true + responses: + 400: + description: Invalid user supplied + content: {} + 404: + description: User not found + content: {} + x-codegen-request-body-name: body + delete: + tags: + - user + summary: Delete user + description: This can only be done by the logged in user. + operationId: deleteUser + parameters: + - name: username + in: path + description: The name that needs to be deleted + required: true + schema: + type: string + responses: + 400: + description: Invalid username supplied + content: {} + 404: + description: User not found + content: {} +components: + schemas: + Order: + type: object + properties: + id: + type: integer + format: int64 + petId: + type: integer + format: int64 + quantity: + type: integer + format: int32 + shipDate: + type: string + format: date-time + status: + type: string + description: Order Status + enum: + - placed + - approved + - delivered + complete: + type: boolean + default: false + xml: + name: Order + Category: + type: object + properties: + id: + type: integer + format: int64 + name: + type: string + xml: + name: Category + User: + type: object + properties: + id: + type: integer + format: int64 + username: + type: string + firstName: + type: string + lastName: + type: string + email: + type: string + password: + type: string + phone: + type: string + userStatus: + type: integer + description: User Status + format: int32 + xml: + name: User + Tag: + type: object + properties: + id: + type: integer + format: int64 + name: + type: string + xml: + name: Tag + Pet: + required: + - name + - photoUrls + type: object + properties: + id: + type: integer + format: int64 + category: + $ref: '#/components/schemas/Category' + name: + type: string + example: doggie + photoUrls: + type: array + xml: + name: photoUrl + wrapped: true + items: + type: string + tags: + type: array + xml: + name: tag + wrapped: true + items: + $ref: '#/components/schemas/Tag' + status: + type: string + description: pet status in the store + enum: + - available + - pending + - sold + xml: + name: Pet + ApiResponse: + type: object + properties: + code: + type: integer + format: int32 + type: + type: string + message: + type: string + securitySchemes: + petstore_auth: + type: oauth2 + flows: + implicit: + authorizationUrl: http://petstore.swagger.io/oauth/dialog + scopes: + write:pets: modify pets in your account + read:pets: read your pets + api_key: + type: apiKey + name: api_key + in: header diff --git a/samples/client/petstore/R/.openapi-generator/FILES b/samples/client/petstore/R/.openapi-generator/FILES index 9385728f010..5ec829dd19d 100644 --- a/samples/client/petstore/R/.openapi-generator/FILES +++ b/samples/client/petstore/R/.openapi-generator/FILES @@ -3,6 +3,7 @@ .travis.yml DESCRIPTION NAMESPACE +README.md R/api_client.R R/api_response.R R/category.R @@ -14,7 +15,6 @@ R/store_api.R R/tag.R R/user.R R/user_api.R -README.md docs/Category.md docs/ModelApiResponse.md docs/Order.md diff --git a/samples/client/petstore/php/OpenAPIClient-php/.openapi-generator/FILES b/samples/client/petstore/php/OpenAPIClient-php/.openapi-generator/FILES index fda1dc9138c..dcbafb2b319 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/.openapi-generator/FILES +++ b/samples/client/petstore/php/OpenAPIClient-php/.openapi-generator/FILES @@ -55,6 +55,7 @@ docs/Model/SpecialModelName.md docs/Model/Tag.md docs/Model/User.md git_push.sh +lib/ApiException.php lib/Api/AnotherFakeApi.php lib/Api/DefaultApi.php lib/Api/FakeApi.php @@ -62,7 +63,6 @@ lib/Api/FakeClassnameTags123Api.php lib/Api/PetApi.php lib/Api/StoreApi.php lib/Api/UserApi.php -lib/ApiException.php lib/Configuration.php lib/HeaderSelector.php lib/Model/AdditionalPropertiesClass.php diff --git a/samples/client/petstore/php/OpenAPIClient-php/phpunit.xml.dist b/samples/client/petstore/php/OpenAPIClient-php/phpunit.xml.dist index 3dd90bbe32c..afbe167922d 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/phpunit.xml.dist +++ b/samples/client/petstore/php/OpenAPIClient-php/phpunit.xml.dist @@ -13,8 +13,8 @@ - ./lib/Api - ./lib/Model + ./lib\/Api + ./lib\/Model diff --git a/samples/client/petstore/powershell/README.md b/samples/client/petstore/powershell/README.md index d394a82a0e9..45adbebb096 100644 --- a/samples/client/petstore/powershell/README.md +++ b/samples/client/petstore/powershell/README.md @@ -79,12 +79,12 @@ Class | Method | HTTP request | Description ## Documentation for Models - - [PSPetstore/Model.ApiResponse](docs/ApiResponse.md) - - [PSPetstore/Model.Category](docs/Category.md) - - [PSPetstore/Model.Order](docs/Order.md) - - [PSPetstore/Model.Pet](docs/Pet.md) - - [PSPetstore/Model.Tag](docs/Tag.md) - - [PSPetstore/Model.User](docs/User.md) + - [PSPetstore\Model.ApiResponse](docs/ApiResponse.md) + - [PSPetstore\Model.Category](docs/Category.md) + - [PSPetstore\Model.Order](docs/Order.md) + - [PSPetstore\Model.Pet](docs/Pet.md) + - [PSPetstore\Model.Tag](docs/Tag.md) + - [PSPetstore\Model.User](docs/User.md) ## Documentation for Authorization diff --git a/samples/client/petstore/powershell/docs/PSPetApi.md b/samples/client/petstore/powershell/docs/PSPetApi.md index 5b8c2a0f2e3..af5ef7d0ded 100644 --- a/samples/client/petstore/powershell/docs/PSPetApi.md +++ b/samples/client/petstore/powershell/docs/PSPetApi.md @@ -1,4 +1,4 @@ -# PSPetstore.PSPetstore/Api.PSPetApi +# PSPetstore.PSPetstore\Api.PSPetApi All URIs are relative to *http://petstore.swagger.io:80/v2* diff --git a/samples/client/petstore/powershell/docs/PSStoreApi.md b/samples/client/petstore/powershell/docs/PSStoreApi.md index 33b3541ced6..2ae1104846c 100644 --- a/samples/client/petstore/powershell/docs/PSStoreApi.md +++ b/samples/client/petstore/powershell/docs/PSStoreApi.md @@ -1,4 +1,4 @@ -# PSPetstore.PSPetstore/Api.PSStoreApi +# PSPetstore.PSPetstore\Api.PSStoreApi All URIs are relative to *http://petstore.swagger.io:80/v2* diff --git a/samples/client/petstore/powershell/docs/PSUserApi.md b/samples/client/petstore/powershell/docs/PSUserApi.md index f008e292f2c..0288084bf1f 100644 --- a/samples/client/petstore/powershell/docs/PSUserApi.md +++ b/samples/client/petstore/powershell/docs/PSUserApi.md @@ -1,4 +1,4 @@ -# PSPetstore.PSPetstore/Api.PSUserApi +# PSPetstore.PSPetstore\Api.PSUserApi All URIs are relative to *http://petstore.swagger.io:80/v2* diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Capitalization.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Capitalization.ts index 72152fe0462..dbb703aad5e 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Capitalization.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Capitalization.ts @@ -51,6 +51,7 @@ export interface Capitalization { sCAETHFlowPoints?: string; /** * Name of the pet + * @type {string} * @memberof Capitalization */ diff --git a/samples/documentation/wsdl/.openapi-generator-ignore b/samples/documentation/wsdl/.openapi-generator-ignore new file mode 100644 index 00000000000..7484ee590a3 --- /dev/null +++ b/samples/documentation/wsdl/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/samples/documentation/wsdl/.openapi-generator/FILES b/samples/documentation/wsdl/.openapi-generator/FILES new file mode 100644 index 00000000000..94285c6e2aa --- /dev/null +++ b/samples/documentation/wsdl/.openapi-generator/FILES @@ -0,0 +1,2 @@ +jaxb-customization.xml +service.wsdl diff --git a/samples/documentation/wsdl/.openapi-generator/VERSION b/samples/documentation/wsdl/.openapi-generator/VERSION new file mode 100644 index 00000000000..6555596f931 --- /dev/null +++ b/samples/documentation/wsdl/.openapi-generator/VERSION @@ -0,0 +1 @@ +5.2.0-SNAPSHOT \ No newline at end of file diff --git a/samples/documentation/wsdl/jaxb-customization.xml b/samples/documentation/wsdl/jaxb-customization.xml new file mode 100644 index 00000000000..0ae533ccb5f --- /dev/null +++ b/samples/documentation/wsdl/jaxb-customization.xml @@ -0,0 +1,28 @@ + + + + true + false + + + + + + + + + + + + + + + + + + diff --git a/samples/documentation/wsdl/service.wsdl b/samples/documentation/wsdl/service.wsdl new file mode 100644 index 00000000000..68ce9752d72 --- /dev/null +++ b/samples/documentation/wsdl/service.wsdl @@ -0,0 +1,1158 @@ + + + + + + + + + Invalid input + + + + + + + Invalid ID supplied + + + + + Pet not found + + + + + + + Invalid status value + + + + + + + Invalid tag value + + + + + + + Invalid ID supplied + + + + + Pet not found + + + + + + + Invalid ID supplied + + + + + Pet not found + + + + + Validation exception + + + + + + + Invalid input + + + + + + + + + Invalid ID supplied + + + + + Order not found + + + + + + + + + Invalid ID supplied + + + + + Order not found + + + + + + + Invalid Order + + + + + + + + + + + + + Invalid username supplied + + + + + User not found + + + + + + + Invalid username supplied + + + + + User not found + + + + + + + Invalid username/password supplied + + + + + + + + + Invalid user supplied + + + + + User not found + + + + + + + + + + + + + + + + + + + + + + + + Order Status + + + + + + + + + + + + + + + pet status in the store + + + + + + + + + + + + + + + + + + + + + + User Status + + + + + + + Order Status + + + + + + + + + + pet status in the store + + + + + + + + + + + + + + + + + + + Pet object that needs to be added to the store + + + + + + + + + Pet id to delete + + + + + + + + + + Status values that need to be considered for filter + + + + + + + + + successful operation + + + + + + + + + Tags to filter by + + + + + + + + + successful operation + + + + + + + + + ID of pet to return + + + + + + + + + successful operation + + + + + + + + + Pet object that needs to be added to the store + + + + + + + + + ID of pet that needs to be updated + + + + + Updated name of the pet + + + + + Updated status of the pet + + + + + + + + + ID of pet to update + + + + + Additional data to pass to server + + + + + file to upload + + + + + + + + + successful operation + + + + + + + + + + ID of the order that needs to be deleted + + + + + + + + + + + + + + successful operation + + + + + + + + + + ID of pet that needs to be fetched + + + + + + + + + + + + + + successful operation + + + + + + + + + order placed for purchasing the pet + + + + + + + + + successful operation + + + + + + + + + Created user object + + + + + + + + + successful operation + + + + + + + + + List of user object + + + + + + + + + successful operation + + + + + + + + + List of user object + + + + + + + + + successful operation + + + + + + + + + The name that needs to be deleted + + + + + + + + + The name that needs to be fetched. Use user1 for testing. + + + + + + + + + successful operation + + + + + + + + + The user name for login + + + + + The password for login in clear text + + + + + + + + + successful operation + + + + + + + + + + successful operation + + + + + + + + + name that need to be updated + + + + + Updated user object + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Add a new pet to the store + + + Invalid input + + + + Deletes a pet + + + Invalid ID supplied + + + Pet not found + + + + Multiple status values can be provided with comma separated strings + + + successful operation + + + Invalid status value + + + + Muliple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + + + successful operation + + + Invalid tag value + + + + Returns a single pet + + + successful operation + + + Invalid ID supplied + + + Pet not found + + + + Update an existing pet + + + Invalid ID supplied + + + Pet not found + + + Validation exception + + + + Updates a pet in the store with form data + + + Invalid input + + + + uploads an image + + + successful operation + + + + For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors + + + Invalid ID supplied + + + Order not found + + + + Returns a map of status codes to quantities + + + successful operation + + + + For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions + + + successful operation + + + Invalid ID supplied + + + Order not found + + + + Place an order for a pet + + + successful operation + + + Invalid Order + + + + This can only be done by the logged in user. + + + successful operation + + + + Creates list of users with given input array + + + successful operation + + + + Creates list of users with given input array + + + successful operation + + + + This can only be done by the logged in user. + + + Invalid username supplied + + + User not found + + + + Get user by user name + + + successful operation + + + Invalid username supplied + + + User not found + + + + Logs user into the system + + + successful operation + + + Invalid username/password supplied + + + + Logs out current logged in user session + + + successful operation + + + + This can only be done by the logged in user. + + + Invalid user supplied + + + User not found + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + + + + + \ No newline at end of file diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/README.md b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/README.md index 48f3b73ec03..fe559da5098 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/README.md +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/README.md @@ -105,53 +105,52 @@ Class | Method | HTTP request | Description [*UserApi*](doc/UserApi.md) | [**logoutUser**](doc/UserApi.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session [*UserApi*](doc/UserApi.md) | [**updateUser**](doc/UserApi.md#updateuser) | **PUT** /user/{username} | Updated user - ## Documentation For Models - - [AdditionalPropertiesClass](doc/AdditionalPropertiesClass.md) - - [Animal](doc/Animal.md) - - [ApiResponse](doc/ApiResponse.md) - - [ArrayOfArrayOfNumberOnly](doc/ArrayOfArrayOfNumberOnly.md) - - [ArrayOfNumberOnly](doc/ArrayOfNumberOnly.md) - - [ArrayTest](doc/ArrayTest.md) - - [Capitalization](doc/Capitalization.md) - - [Cat](doc/Cat.md) - - [CatAllOf](doc/CatAllOf.md) - - [Category](doc/Category.md) - - [ClassModel](doc/ClassModel.md) - - [Dog](doc/Dog.md) - - [DogAllOf](doc/DogAllOf.md) - - [EnumArrays](doc/EnumArrays.md) - - [EnumTest](doc/EnumTest.md) - - [FileSchemaTestClass](doc/FileSchemaTestClass.md) - - [Foo](doc/Foo.md) - - [FormatTest](doc/FormatTest.md) - - [HasOnlyReadOnly](doc/HasOnlyReadOnly.md) - - [HealthCheckResult](doc/HealthCheckResult.md) - - [InlineResponseDefault](doc/InlineResponseDefault.md) - - [MapTest](doc/MapTest.md) - - [MixedPropertiesAndAdditionalPropertiesClass](doc/MixedPropertiesAndAdditionalPropertiesClass.md) - - [Model200Response](doc/Model200Response.md) - - [ModelClient](doc/ModelClient.md) - - [ModelEnumClass](doc/ModelEnumClass.md) - - [ModelFile](doc/ModelFile.md) - - [ModelList](doc/ModelList.md) - - [ModelReturn](doc/ModelReturn.md) - - [Name](doc/Name.md) - - [NullableClass](doc/NullableClass.md) - - [NumberOnly](doc/NumberOnly.md) - - [Order](doc/Order.md) - - [OuterComposite](doc/OuterComposite.md) - - [OuterEnum](doc/OuterEnum.md) - - [OuterEnumDefaultValue](doc/OuterEnumDefaultValue.md) - - [OuterEnumInteger](doc/OuterEnumInteger.md) - - [OuterEnumIntegerDefaultValue](doc/OuterEnumIntegerDefaultValue.md) - - [OuterObjectWithEnumProperty](doc/OuterObjectWithEnumProperty.md) - - [Pet](doc/Pet.md) - - [ReadOnlyFirst](doc/ReadOnlyFirst.md) - - [SpecialModelName](doc/SpecialModelName.md) - - [Tag](doc/Tag.md) - - [User](doc/User.md) + - [AdditionalPropertiesClass](doc\AdditionalPropertiesClass.md) + - [Animal](doc\Animal.md) + - [ApiResponse](doc\ApiResponse.md) + - [ArrayOfArrayOfNumberOnly](doc\ArrayOfArrayOfNumberOnly.md) + - [ArrayOfNumberOnly](doc\ArrayOfNumberOnly.md) + - [ArrayTest](doc\ArrayTest.md) + - [Capitalization](doc\Capitalization.md) + - [Cat](doc\Cat.md) + - [CatAllOf](doc\CatAllOf.md) + - [Category](doc\Category.md) + - [ClassModel](doc\ClassModel.md) + - [Dog](doc\Dog.md) + - [DogAllOf](doc\DogAllOf.md) + - [EnumArrays](doc\EnumArrays.md) + - [EnumTest](doc\EnumTest.md) + - [FileSchemaTestClass](doc\FileSchemaTestClass.md) + - [Foo](doc\Foo.md) + - [FormatTest](doc\FormatTest.md) + - [HasOnlyReadOnly](doc\HasOnlyReadOnly.md) + - [HealthCheckResult](doc\HealthCheckResult.md) + - [InlineResponseDefault](doc\InlineResponseDefault.md) + - [MapTest](doc\MapTest.md) + - [MixedPropertiesAndAdditionalPropertiesClass](doc\MixedPropertiesAndAdditionalPropertiesClass.md) + - [Model200Response](doc\Model200Response.md) + - [ModelClient](doc\ModelClient.md) + - [ModelEnumClass](doc\ModelEnumClass.md) + - [ModelFile](doc\ModelFile.md) + - [ModelList](doc\ModelList.md) + - [ModelReturn](doc\ModelReturn.md) + - [Name](doc\Name.md) + - [NullableClass](doc\NullableClass.md) + - [NumberOnly](doc\NumberOnly.md) + - [Order](doc\Order.md) + - [OuterComposite](doc\OuterComposite.md) + - [OuterEnum](doc\OuterEnum.md) + - [OuterEnumDefaultValue](doc\OuterEnumDefaultValue.md) + - [OuterEnumInteger](doc\OuterEnumInteger.md) + - [OuterEnumIntegerDefaultValue](doc\OuterEnumIntegerDefaultValue.md) + - [OuterObjectWithEnumProperty](doc\OuterObjectWithEnumProperty.md) + - [Pet](doc\Pet.md) + - [ReadOnlyFirst](doc\ReadOnlyFirst.md) + - [SpecialModelName](doc\SpecialModelName.md) + - [Tag](doc\Tag.md) + - [User](doc\User.md) ## Documentation For Authorization diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/README.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/README.md index ac04fa9f72b..cd35141505e 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/README.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/README.md @@ -82,12 +82,12 @@ Class | Method | HTTP request | Description ## Documentation For Models - - [ApiResponse](doc/ApiResponse.md) - - [Category](doc/Category.md) - - [Order](doc/Order.md) - - [Pet](doc/Pet.md) - - [Tag](doc/Tag.md) - - [User](doc/User.md) + - [ApiResponse](doc\ApiResponse.md) + - [Category](doc\Category.md) + - [Order](doc\Order.md) + - [Pet](doc\Pet.md) + - [Tag](doc\Tag.md) + - [User](doc\User.md) ## Documentation For Authorization diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/README.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/README.md index 22789ae7761..36738b4ade8 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/README.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/README.md @@ -102,50 +102,50 @@ Class | Method | HTTP request | Description ## Documentation For Models - - [AdditionalPropertiesClass](doc/AdditionalPropertiesClass.md) - - [Animal](doc/Animal.md) - - [ApiResponse](doc/ApiResponse.md) - - [ArrayOfArrayOfNumberOnly](doc/ArrayOfArrayOfNumberOnly.md) - - [ArrayOfNumberOnly](doc/ArrayOfNumberOnly.md) - - [ArrayTest](doc/ArrayTest.md) - - [Capitalization](doc/Capitalization.md) - - [Cat](doc/Cat.md) - - [CatAllOf](doc/CatAllOf.md) - - [Category](doc/Category.md) - - [ClassModel](doc/ClassModel.md) - - [Dog](doc/Dog.md) - - [DogAllOf](doc/DogAllOf.md) - - [EnumArrays](doc/EnumArrays.md) - - [EnumTest](doc/EnumTest.md) - - [FileSchemaTestClass](doc/FileSchemaTestClass.md) - - [Foo](doc/Foo.md) - - [FormatTest](doc/FormatTest.md) - - [HasOnlyReadOnly](doc/HasOnlyReadOnly.md) - - [HealthCheckResult](doc/HealthCheckResult.md) - - [InlineResponseDefault](doc/InlineResponseDefault.md) - - [MapTest](doc/MapTest.md) - - [MixedPropertiesAndAdditionalPropertiesClass](doc/MixedPropertiesAndAdditionalPropertiesClass.md) - - [Model200Response](doc/Model200Response.md) - - [ModelClient](doc/ModelClient.md) - - [ModelEnumClass](doc/ModelEnumClass.md) - - [ModelFile](doc/ModelFile.md) - - [ModelList](doc/ModelList.md) - - [ModelReturn](doc/ModelReturn.md) - - [Name](doc/Name.md) - - [NullableClass](doc/NullableClass.md) - - [NumberOnly](doc/NumberOnly.md) - - [Order](doc/Order.md) - - [OuterComposite](doc/OuterComposite.md) - - [OuterEnum](doc/OuterEnum.md) - - [OuterEnumDefaultValue](doc/OuterEnumDefaultValue.md) - - [OuterEnumInteger](doc/OuterEnumInteger.md) - - [OuterEnumIntegerDefaultValue](doc/OuterEnumIntegerDefaultValue.md) - - [OuterObjectWithEnumProperty](doc/OuterObjectWithEnumProperty.md) - - [Pet](doc/Pet.md) - - [ReadOnlyFirst](doc/ReadOnlyFirst.md) - - [SpecialModelName](doc/SpecialModelName.md) - - [Tag](doc/Tag.md) - - [User](doc/User.md) + - [AdditionalPropertiesClass](doc\AdditionalPropertiesClass.md) + - [Animal](doc\Animal.md) + - [ApiResponse](doc\ApiResponse.md) + - [ArrayOfArrayOfNumberOnly](doc\ArrayOfArrayOfNumberOnly.md) + - [ArrayOfNumberOnly](doc\ArrayOfNumberOnly.md) + - [ArrayTest](doc\ArrayTest.md) + - [Capitalization](doc\Capitalization.md) + - [Cat](doc\Cat.md) + - [CatAllOf](doc\CatAllOf.md) + - [Category](doc\Category.md) + - [ClassModel](doc\ClassModel.md) + - [Dog](doc\Dog.md) + - [DogAllOf](doc\DogAllOf.md) + - [EnumArrays](doc\EnumArrays.md) + - [EnumTest](doc\EnumTest.md) + - [FileSchemaTestClass](doc\FileSchemaTestClass.md) + - [Foo](doc\Foo.md) + - [FormatTest](doc\FormatTest.md) + - [HasOnlyReadOnly](doc\HasOnlyReadOnly.md) + - [HealthCheckResult](doc\HealthCheckResult.md) + - [InlineResponseDefault](doc\InlineResponseDefault.md) + - [MapTest](doc\MapTest.md) + - [MixedPropertiesAndAdditionalPropertiesClass](doc\MixedPropertiesAndAdditionalPropertiesClass.md) + - [Model200Response](doc\Model200Response.md) + - [ModelClient](doc\ModelClient.md) + - [ModelEnumClass](doc\ModelEnumClass.md) + - [ModelFile](doc\ModelFile.md) + - [ModelList](doc\ModelList.md) + - [ModelReturn](doc\ModelReturn.md) + - [Name](doc\Name.md) + - [NullableClass](doc\NullableClass.md) + - [NumberOnly](doc\NumberOnly.md) + - [Order](doc\Order.md) + - [OuterComposite](doc\OuterComposite.md) + - [OuterEnum](doc\OuterEnum.md) + - [OuterEnumDefaultValue](doc\OuterEnumDefaultValue.md) + - [OuterEnumInteger](doc\OuterEnumInteger.md) + - [OuterEnumIntegerDefaultValue](doc\OuterEnumIntegerDefaultValue.md) + - [OuterObjectWithEnumProperty](doc\OuterObjectWithEnumProperty.md) + - [Pet](doc\Pet.md) + - [ReadOnlyFirst](doc\ReadOnlyFirst.md) + - [SpecialModelName](doc\SpecialModelName.md) + - [Tag](doc\Tag.md) + - [User](doc\User.md) ## Documentation For Authorization diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/README.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib/README.md index 99bd229f3c5..18de35ccec0 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/README.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/README.md @@ -60,36 +60,36 @@ All URIs are relative to *http://petstore.swagger.io/v2* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*PetApi* | [**addPet**](doc//PetApi.md#addpet) | **POST** /pet | Add a new pet to the store -*PetApi* | [**deletePet**](doc//PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet -*PetApi* | [**findPetsByStatus**](doc//PetApi.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status -*PetApi* | [**findPetsByTags**](doc//PetApi.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags -*PetApi* | [**getPetById**](doc//PetApi.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID -*PetApi* | [**updatePet**](doc//PetApi.md#updatepet) | **PUT** /pet | Update an existing pet -*PetApi* | [**updatePetWithForm**](doc//PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data -*PetApi* | [**uploadFile**](doc//PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image -*StoreApi* | [**deleteOrder**](doc//StoreApi.md#deleteorder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID -*StoreApi* | [**getInventory**](doc//StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status -*StoreApi* | [**getOrderById**](doc//StoreApi.md#getorderbyid) | **GET** /store/order/{orderId} | Find purchase order by ID -*StoreApi* | [**placeOrder**](doc//StoreApi.md#placeorder) | **POST** /store/order | Place an order for a pet -*UserApi* | [**createUser**](doc//UserApi.md#createuser) | **POST** /user | Create user -*UserApi* | [**createUsersWithArrayInput**](doc//UserApi.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array -*UserApi* | [**createUsersWithListInput**](doc//UserApi.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array -*UserApi* | [**deleteUser**](doc//UserApi.md#deleteuser) | **DELETE** /user/{username} | Delete user -*UserApi* | [**getUserByName**](doc//UserApi.md#getuserbyname) | **GET** /user/{username} | Get user by user name -*UserApi* | [**loginUser**](doc//UserApi.md#loginuser) | **GET** /user/login | Logs user into the system -*UserApi* | [**logoutUser**](doc//UserApi.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session -*UserApi* | [**updateUser**](doc//UserApi.md#updateuser) | **PUT** /user/{username} | Updated user +*PetApi* | [**addPet**](doc\/PetApi.md#addpet) | **POST** /pet | Add a new pet to the store +*PetApi* | [**deletePet**](doc\/PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet +*PetApi* | [**findPetsByStatus**](doc\/PetApi.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status +*PetApi* | [**findPetsByTags**](doc\/PetApi.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags +*PetApi* | [**getPetById**](doc\/PetApi.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID +*PetApi* | [**updatePet**](doc\/PetApi.md#updatepet) | **PUT** /pet | Update an existing pet +*PetApi* | [**updatePetWithForm**](doc\/PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data +*PetApi* | [**uploadFile**](doc\/PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image +*StoreApi* | [**deleteOrder**](doc\/StoreApi.md#deleteorder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID +*StoreApi* | [**getInventory**](doc\/StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status +*StoreApi* | [**getOrderById**](doc\/StoreApi.md#getorderbyid) | **GET** /store/order/{orderId} | Find purchase order by ID +*StoreApi* | [**placeOrder**](doc\/StoreApi.md#placeorder) | **POST** /store/order | Place an order for a pet +*UserApi* | [**createUser**](doc\/UserApi.md#createuser) | **POST** /user | Create user +*UserApi* | [**createUsersWithArrayInput**](doc\/UserApi.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array +*UserApi* | [**createUsersWithListInput**](doc\/UserApi.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array +*UserApi* | [**deleteUser**](doc\/UserApi.md#deleteuser) | **DELETE** /user/{username} | Delete user +*UserApi* | [**getUserByName**](doc\/UserApi.md#getuserbyname) | **GET** /user/{username} | Get user by user name +*UserApi* | [**loginUser**](doc\/UserApi.md#loginuser) | **GET** /user/login | Logs user into the system +*UserApi* | [**logoutUser**](doc\/UserApi.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session +*UserApi* | [**updateUser**](doc\/UserApi.md#updateuser) | **PUT** /user/{username} | Updated user ## Documentation For Models - - [ApiResponse](doc//ApiResponse.md) - - [Category](doc//Category.md) - - [Order](doc//Order.md) - - [Pet](doc//Pet.md) - - [Tag](doc//Tag.md) - - [User](doc//User.md) + - [ApiResponse](doc\/ApiResponse.md) + - [Category](doc\/Category.md) + - [Order](doc\/Order.md) + - [Pet](doc\/Pet.md) + - [Tag](doc\/Tag.md) + - [User](doc\/User.md) ## Documentation For Authorization diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/README.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/README.md index fe39c2f2126..9b39a96c6b7 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/README.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/README.md @@ -58,94 +58,94 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*AnotherFakeApi* | [**call123testSpecialTags**](doc//AnotherFakeApi.md#call123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags -*DefaultApi* | [**fooGet**](doc//DefaultApi.md#fooget) | **GET** /foo | -*FakeApi* | [**fakeHealthGet**](doc//FakeApi.md#fakehealthget) | **GET** /fake/health | Health check endpoint -*FakeApi* | [**fakeHttpSignatureTest**](doc//FakeApi.md#fakehttpsignaturetest) | **GET** /fake/http-signature-test | test http signature authentication -*FakeApi* | [**fakeOuterBooleanSerialize**](doc//FakeApi.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean | -*FakeApi* | [**fakeOuterCompositeSerialize**](doc//FakeApi.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | -*FakeApi* | [**fakeOuterNumberSerialize**](doc//FakeApi.md#fakeouternumberserialize) | **POST** /fake/outer/number | -*FakeApi* | [**fakeOuterStringSerialize**](doc//FakeApi.md#fakeouterstringserialize) | **POST** /fake/outer/string | -*FakeApi* | [**fakePropertyEnumIntegerSerialize**](doc//FakeApi.md#fakepropertyenumintegerserialize) | **POST** /fake/property/enum-int | -*FakeApi* | [**testBodyWithFileSchema**](doc//FakeApi.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | -*FakeApi* | [**testBodyWithQueryParams**](doc//FakeApi.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | -*FakeApi* | [**testClientModel**](doc//FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model -*FakeApi* | [**testEndpointParameters**](doc//FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -*FakeApi* | [**testEnumParameters**](doc//FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters -*FakeApi* | [**testGroupParameters**](doc//FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) -*FakeApi* | [**testInlineAdditionalProperties**](doc//FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties -*FakeApi* | [**testJsonFormData**](doc//FakeApi.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data -*FakeApi* | [**testQueryParameterCollectionFormat**](doc//FakeApi.md#testqueryparametercollectionformat) | **PUT** /fake/test-query-paramters | -*FakeClassnameTags123Api* | [**testClassname**](doc//FakeClassnameTags123Api.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case -*PetApi* | [**addPet**](doc//PetApi.md#addpet) | **POST** /pet | Add a new pet to the store -*PetApi* | [**deletePet**](doc//PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet -*PetApi* | [**findPetsByStatus**](doc//PetApi.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status -*PetApi* | [**findPetsByTags**](doc//PetApi.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags -*PetApi* | [**getPetById**](doc//PetApi.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID -*PetApi* | [**updatePet**](doc//PetApi.md#updatepet) | **PUT** /pet | Update an existing pet -*PetApi* | [**updatePetWithForm**](doc//PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data -*PetApi* | [**uploadFile**](doc//PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image -*PetApi* | [**uploadFileWithRequiredFile**](doc//PetApi.md#uploadfilewithrequiredfile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) -*StoreApi* | [**deleteOrder**](doc//StoreApi.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID -*StoreApi* | [**getInventory**](doc//StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status -*StoreApi* | [**getOrderById**](doc//StoreApi.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID -*StoreApi* | [**placeOrder**](doc//StoreApi.md#placeorder) | **POST** /store/order | Place an order for a pet -*UserApi* | [**createUser**](doc//UserApi.md#createuser) | **POST** /user | Create user -*UserApi* | [**createUsersWithArrayInput**](doc//UserApi.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array -*UserApi* | [**createUsersWithListInput**](doc//UserApi.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array -*UserApi* | [**deleteUser**](doc//UserApi.md#deleteuser) | **DELETE** /user/{username} | Delete user -*UserApi* | [**getUserByName**](doc//UserApi.md#getuserbyname) | **GET** /user/{username} | Get user by user name -*UserApi* | [**loginUser**](doc//UserApi.md#loginuser) | **GET** /user/login | Logs user into the system -*UserApi* | [**logoutUser**](doc//UserApi.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session -*UserApi* | [**updateUser**](doc//UserApi.md#updateuser) | **PUT** /user/{username} | Updated user +*AnotherFakeApi* | [**call123testSpecialTags**](doc\/AnotherFakeApi.md#call123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags +*DefaultApi* | [**fooGet**](doc\/DefaultApi.md#fooget) | **GET** /foo | +*FakeApi* | [**fakeHealthGet**](doc\/FakeApi.md#fakehealthget) | **GET** /fake/health | Health check endpoint +*FakeApi* | [**fakeHttpSignatureTest**](doc\/FakeApi.md#fakehttpsignaturetest) | **GET** /fake/http-signature-test | test http signature authentication +*FakeApi* | [**fakeOuterBooleanSerialize**](doc\/FakeApi.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean | +*FakeApi* | [**fakeOuterCompositeSerialize**](doc\/FakeApi.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | +*FakeApi* | [**fakeOuterNumberSerialize**](doc\/FakeApi.md#fakeouternumberserialize) | **POST** /fake/outer/number | +*FakeApi* | [**fakeOuterStringSerialize**](doc\/FakeApi.md#fakeouterstringserialize) | **POST** /fake/outer/string | +*FakeApi* | [**fakePropertyEnumIntegerSerialize**](doc\/FakeApi.md#fakepropertyenumintegerserialize) | **POST** /fake/property/enum-int | +*FakeApi* | [**testBodyWithFileSchema**](doc\/FakeApi.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | +*FakeApi* | [**testBodyWithQueryParams**](doc\/FakeApi.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | +*FakeApi* | [**testClientModel**](doc\/FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model +*FakeApi* | [**testEndpointParameters**](doc\/FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +*FakeApi* | [**testEnumParameters**](doc\/FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters +*FakeApi* | [**testGroupParameters**](doc\/FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) +*FakeApi* | [**testInlineAdditionalProperties**](doc\/FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties +*FakeApi* | [**testJsonFormData**](doc\/FakeApi.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data +*FakeApi* | [**testQueryParameterCollectionFormat**](doc\/FakeApi.md#testqueryparametercollectionformat) | **PUT** /fake/test-query-paramters | +*FakeClassnameTags123Api* | [**testClassname**](doc\/FakeClassnameTags123Api.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case +*PetApi* | [**addPet**](doc\/PetApi.md#addpet) | **POST** /pet | Add a new pet to the store +*PetApi* | [**deletePet**](doc\/PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet +*PetApi* | [**findPetsByStatus**](doc\/PetApi.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status +*PetApi* | [**findPetsByTags**](doc\/PetApi.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags +*PetApi* | [**getPetById**](doc\/PetApi.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID +*PetApi* | [**updatePet**](doc\/PetApi.md#updatepet) | **PUT** /pet | Update an existing pet +*PetApi* | [**updatePetWithForm**](doc\/PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data +*PetApi* | [**uploadFile**](doc\/PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image +*PetApi* | [**uploadFileWithRequiredFile**](doc\/PetApi.md#uploadfilewithrequiredfile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) +*StoreApi* | [**deleteOrder**](doc\/StoreApi.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID +*StoreApi* | [**getInventory**](doc\/StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status +*StoreApi* | [**getOrderById**](doc\/StoreApi.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID +*StoreApi* | [**placeOrder**](doc\/StoreApi.md#placeorder) | **POST** /store/order | Place an order for a pet +*UserApi* | [**createUser**](doc\/UserApi.md#createuser) | **POST** /user | Create user +*UserApi* | [**createUsersWithArrayInput**](doc\/UserApi.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array +*UserApi* | [**createUsersWithListInput**](doc\/UserApi.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array +*UserApi* | [**deleteUser**](doc\/UserApi.md#deleteuser) | **DELETE** /user/{username} | Delete user +*UserApi* | [**getUserByName**](doc\/UserApi.md#getuserbyname) | **GET** /user/{username} | Get user by user name +*UserApi* | [**loginUser**](doc\/UserApi.md#loginuser) | **GET** /user/login | Logs user into the system +*UserApi* | [**logoutUser**](doc\/UserApi.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session +*UserApi* | [**updateUser**](doc\/UserApi.md#updateuser) | **PUT** /user/{username} | Updated user ## Documentation For Models - - [AdditionalPropertiesClass](doc//AdditionalPropertiesClass.md) - - [Animal](doc//Animal.md) - - [ApiResponse](doc//ApiResponse.md) - - [ArrayOfArrayOfNumberOnly](doc//ArrayOfArrayOfNumberOnly.md) - - [ArrayOfNumberOnly](doc//ArrayOfNumberOnly.md) - - [ArrayTest](doc//ArrayTest.md) - - [Capitalization](doc//Capitalization.md) - - [Cat](doc//Cat.md) - - [CatAllOf](doc//CatAllOf.md) - - [Category](doc//Category.md) - - [ClassModel](doc//ClassModel.md) - - [Dog](doc//Dog.md) - - [DogAllOf](doc//DogAllOf.md) - - [EnumArrays](doc//EnumArrays.md) - - [EnumClass](doc//EnumClass.md) - - [EnumTest](doc//EnumTest.md) - - [FileSchemaTestClass](doc//FileSchemaTestClass.md) - - [Foo](doc//Foo.md) - - [FormatTest](doc//FormatTest.md) - - [HasOnlyReadOnly](doc//HasOnlyReadOnly.md) - - [HealthCheckResult](doc//HealthCheckResult.md) - - [InlineResponseDefault](doc//InlineResponseDefault.md) - - [MapTest](doc//MapTest.md) - - [MixedPropertiesAndAdditionalPropertiesClass](doc//MixedPropertiesAndAdditionalPropertiesClass.md) - - [Model200Response](doc//Model200Response.md) - - [ModelClient](doc//ModelClient.md) - - [ModelFile](doc//ModelFile.md) - - [ModelList](doc//ModelList.md) - - [ModelReturn](doc//ModelReturn.md) - - [Name](doc//Name.md) - - [NullableClass](doc//NullableClass.md) - - [NumberOnly](doc//NumberOnly.md) - - [Order](doc//Order.md) - - [OuterComposite](doc//OuterComposite.md) - - [OuterEnum](doc//OuterEnum.md) - - [OuterEnumDefaultValue](doc//OuterEnumDefaultValue.md) - - [OuterEnumInteger](doc//OuterEnumInteger.md) - - [OuterEnumIntegerDefaultValue](doc//OuterEnumIntegerDefaultValue.md) - - [OuterObjectWithEnumProperty](doc//OuterObjectWithEnumProperty.md) - - [Pet](doc//Pet.md) - - [ReadOnlyFirst](doc//ReadOnlyFirst.md) - - [SpecialModelName](doc//SpecialModelName.md) - - [Tag](doc//Tag.md) - - [User](doc//User.md) + - [AdditionalPropertiesClass](doc\/AdditionalPropertiesClass.md) + - [Animal](doc\/Animal.md) + - [ApiResponse](doc\/ApiResponse.md) + - [ArrayOfArrayOfNumberOnly](doc\/ArrayOfArrayOfNumberOnly.md) + - [ArrayOfNumberOnly](doc\/ArrayOfNumberOnly.md) + - [ArrayTest](doc\/ArrayTest.md) + - [Capitalization](doc\/Capitalization.md) + - [Cat](doc\/Cat.md) + - [CatAllOf](doc\/CatAllOf.md) + - [Category](doc\/Category.md) + - [ClassModel](doc\/ClassModel.md) + - [Dog](doc\/Dog.md) + - [DogAllOf](doc\/DogAllOf.md) + - [EnumArrays](doc\/EnumArrays.md) + - [EnumClass](doc\/EnumClass.md) + - [EnumTest](doc\/EnumTest.md) + - [FileSchemaTestClass](doc\/FileSchemaTestClass.md) + - [Foo](doc\/Foo.md) + - [FormatTest](doc\/FormatTest.md) + - [HasOnlyReadOnly](doc\/HasOnlyReadOnly.md) + - [HealthCheckResult](doc\/HealthCheckResult.md) + - [InlineResponseDefault](doc\/InlineResponseDefault.md) + - [MapTest](doc\/MapTest.md) + - [MixedPropertiesAndAdditionalPropertiesClass](doc\/MixedPropertiesAndAdditionalPropertiesClass.md) + - [Model200Response](doc\/Model200Response.md) + - [ModelClient](doc\/ModelClient.md) + - [ModelFile](doc\/ModelFile.md) + - [ModelList](doc\/ModelList.md) + - [ModelReturn](doc\/ModelReturn.md) + - [Name](doc\/Name.md) + - [NullableClass](doc\/NullableClass.md) + - [NumberOnly](doc\/NumberOnly.md) + - [Order](doc\/Order.md) + - [OuterComposite](doc\/OuterComposite.md) + - [OuterEnum](doc\/OuterEnum.md) + - [OuterEnumDefaultValue](doc\/OuterEnumDefaultValue.md) + - [OuterEnumInteger](doc\/OuterEnumInteger.md) + - [OuterEnumIntegerDefaultValue](doc\/OuterEnumIntegerDefaultValue.md) + - [OuterObjectWithEnumProperty](doc\/OuterObjectWithEnumProperty.md) + - [Pet](doc\/Pet.md) + - [ReadOnlyFirst](doc\/ReadOnlyFirst.md) + - [SpecialModelName](doc\/SpecialModelName.md) + - [Tag](doc\/Tag.md) + - [User](doc\/User.md) ## Documentation For Authorization diff --git a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/README.md b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/README.md index fe39c2f2126..9b39a96c6b7 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/README.md +++ b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/README.md @@ -58,94 +58,94 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*AnotherFakeApi* | [**call123testSpecialTags**](doc//AnotherFakeApi.md#call123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags -*DefaultApi* | [**fooGet**](doc//DefaultApi.md#fooget) | **GET** /foo | -*FakeApi* | [**fakeHealthGet**](doc//FakeApi.md#fakehealthget) | **GET** /fake/health | Health check endpoint -*FakeApi* | [**fakeHttpSignatureTest**](doc//FakeApi.md#fakehttpsignaturetest) | **GET** /fake/http-signature-test | test http signature authentication -*FakeApi* | [**fakeOuterBooleanSerialize**](doc//FakeApi.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean | -*FakeApi* | [**fakeOuterCompositeSerialize**](doc//FakeApi.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | -*FakeApi* | [**fakeOuterNumberSerialize**](doc//FakeApi.md#fakeouternumberserialize) | **POST** /fake/outer/number | -*FakeApi* | [**fakeOuterStringSerialize**](doc//FakeApi.md#fakeouterstringserialize) | **POST** /fake/outer/string | -*FakeApi* | [**fakePropertyEnumIntegerSerialize**](doc//FakeApi.md#fakepropertyenumintegerserialize) | **POST** /fake/property/enum-int | -*FakeApi* | [**testBodyWithFileSchema**](doc//FakeApi.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | -*FakeApi* | [**testBodyWithQueryParams**](doc//FakeApi.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | -*FakeApi* | [**testClientModel**](doc//FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model -*FakeApi* | [**testEndpointParameters**](doc//FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -*FakeApi* | [**testEnumParameters**](doc//FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters -*FakeApi* | [**testGroupParameters**](doc//FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) -*FakeApi* | [**testInlineAdditionalProperties**](doc//FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties -*FakeApi* | [**testJsonFormData**](doc//FakeApi.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data -*FakeApi* | [**testQueryParameterCollectionFormat**](doc//FakeApi.md#testqueryparametercollectionformat) | **PUT** /fake/test-query-paramters | -*FakeClassnameTags123Api* | [**testClassname**](doc//FakeClassnameTags123Api.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case -*PetApi* | [**addPet**](doc//PetApi.md#addpet) | **POST** /pet | Add a new pet to the store -*PetApi* | [**deletePet**](doc//PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet -*PetApi* | [**findPetsByStatus**](doc//PetApi.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status -*PetApi* | [**findPetsByTags**](doc//PetApi.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags -*PetApi* | [**getPetById**](doc//PetApi.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID -*PetApi* | [**updatePet**](doc//PetApi.md#updatepet) | **PUT** /pet | Update an existing pet -*PetApi* | [**updatePetWithForm**](doc//PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data -*PetApi* | [**uploadFile**](doc//PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image -*PetApi* | [**uploadFileWithRequiredFile**](doc//PetApi.md#uploadfilewithrequiredfile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) -*StoreApi* | [**deleteOrder**](doc//StoreApi.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID -*StoreApi* | [**getInventory**](doc//StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status -*StoreApi* | [**getOrderById**](doc//StoreApi.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID -*StoreApi* | [**placeOrder**](doc//StoreApi.md#placeorder) | **POST** /store/order | Place an order for a pet -*UserApi* | [**createUser**](doc//UserApi.md#createuser) | **POST** /user | Create user -*UserApi* | [**createUsersWithArrayInput**](doc//UserApi.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array -*UserApi* | [**createUsersWithListInput**](doc//UserApi.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array -*UserApi* | [**deleteUser**](doc//UserApi.md#deleteuser) | **DELETE** /user/{username} | Delete user -*UserApi* | [**getUserByName**](doc//UserApi.md#getuserbyname) | **GET** /user/{username} | Get user by user name -*UserApi* | [**loginUser**](doc//UserApi.md#loginuser) | **GET** /user/login | Logs user into the system -*UserApi* | [**logoutUser**](doc//UserApi.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session -*UserApi* | [**updateUser**](doc//UserApi.md#updateuser) | **PUT** /user/{username} | Updated user +*AnotherFakeApi* | [**call123testSpecialTags**](doc\/AnotherFakeApi.md#call123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags +*DefaultApi* | [**fooGet**](doc\/DefaultApi.md#fooget) | **GET** /foo | +*FakeApi* | [**fakeHealthGet**](doc\/FakeApi.md#fakehealthget) | **GET** /fake/health | Health check endpoint +*FakeApi* | [**fakeHttpSignatureTest**](doc\/FakeApi.md#fakehttpsignaturetest) | **GET** /fake/http-signature-test | test http signature authentication +*FakeApi* | [**fakeOuterBooleanSerialize**](doc\/FakeApi.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean | +*FakeApi* | [**fakeOuterCompositeSerialize**](doc\/FakeApi.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | +*FakeApi* | [**fakeOuterNumberSerialize**](doc\/FakeApi.md#fakeouternumberserialize) | **POST** /fake/outer/number | +*FakeApi* | [**fakeOuterStringSerialize**](doc\/FakeApi.md#fakeouterstringserialize) | **POST** /fake/outer/string | +*FakeApi* | [**fakePropertyEnumIntegerSerialize**](doc\/FakeApi.md#fakepropertyenumintegerserialize) | **POST** /fake/property/enum-int | +*FakeApi* | [**testBodyWithFileSchema**](doc\/FakeApi.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | +*FakeApi* | [**testBodyWithQueryParams**](doc\/FakeApi.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | +*FakeApi* | [**testClientModel**](doc\/FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model +*FakeApi* | [**testEndpointParameters**](doc\/FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +*FakeApi* | [**testEnumParameters**](doc\/FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters +*FakeApi* | [**testGroupParameters**](doc\/FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) +*FakeApi* | [**testInlineAdditionalProperties**](doc\/FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties +*FakeApi* | [**testJsonFormData**](doc\/FakeApi.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data +*FakeApi* | [**testQueryParameterCollectionFormat**](doc\/FakeApi.md#testqueryparametercollectionformat) | **PUT** /fake/test-query-paramters | +*FakeClassnameTags123Api* | [**testClassname**](doc\/FakeClassnameTags123Api.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case +*PetApi* | [**addPet**](doc\/PetApi.md#addpet) | **POST** /pet | Add a new pet to the store +*PetApi* | [**deletePet**](doc\/PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet +*PetApi* | [**findPetsByStatus**](doc\/PetApi.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status +*PetApi* | [**findPetsByTags**](doc\/PetApi.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags +*PetApi* | [**getPetById**](doc\/PetApi.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID +*PetApi* | [**updatePet**](doc\/PetApi.md#updatepet) | **PUT** /pet | Update an existing pet +*PetApi* | [**updatePetWithForm**](doc\/PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data +*PetApi* | [**uploadFile**](doc\/PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image +*PetApi* | [**uploadFileWithRequiredFile**](doc\/PetApi.md#uploadfilewithrequiredfile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) +*StoreApi* | [**deleteOrder**](doc\/StoreApi.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID +*StoreApi* | [**getInventory**](doc\/StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status +*StoreApi* | [**getOrderById**](doc\/StoreApi.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID +*StoreApi* | [**placeOrder**](doc\/StoreApi.md#placeorder) | **POST** /store/order | Place an order for a pet +*UserApi* | [**createUser**](doc\/UserApi.md#createuser) | **POST** /user | Create user +*UserApi* | [**createUsersWithArrayInput**](doc\/UserApi.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array +*UserApi* | [**createUsersWithListInput**](doc\/UserApi.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array +*UserApi* | [**deleteUser**](doc\/UserApi.md#deleteuser) | **DELETE** /user/{username} | Delete user +*UserApi* | [**getUserByName**](doc\/UserApi.md#getuserbyname) | **GET** /user/{username} | Get user by user name +*UserApi* | [**loginUser**](doc\/UserApi.md#loginuser) | **GET** /user/login | Logs user into the system +*UserApi* | [**logoutUser**](doc\/UserApi.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session +*UserApi* | [**updateUser**](doc\/UserApi.md#updateuser) | **PUT** /user/{username} | Updated user ## Documentation For Models - - [AdditionalPropertiesClass](doc//AdditionalPropertiesClass.md) - - [Animal](doc//Animal.md) - - [ApiResponse](doc//ApiResponse.md) - - [ArrayOfArrayOfNumberOnly](doc//ArrayOfArrayOfNumberOnly.md) - - [ArrayOfNumberOnly](doc//ArrayOfNumberOnly.md) - - [ArrayTest](doc//ArrayTest.md) - - [Capitalization](doc//Capitalization.md) - - [Cat](doc//Cat.md) - - [CatAllOf](doc//CatAllOf.md) - - [Category](doc//Category.md) - - [ClassModel](doc//ClassModel.md) - - [Dog](doc//Dog.md) - - [DogAllOf](doc//DogAllOf.md) - - [EnumArrays](doc//EnumArrays.md) - - [EnumClass](doc//EnumClass.md) - - [EnumTest](doc//EnumTest.md) - - [FileSchemaTestClass](doc//FileSchemaTestClass.md) - - [Foo](doc//Foo.md) - - [FormatTest](doc//FormatTest.md) - - [HasOnlyReadOnly](doc//HasOnlyReadOnly.md) - - [HealthCheckResult](doc//HealthCheckResult.md) - - [InlineResponseDefault](doc//InlineResponseDefault.md) - - [MapTest](doc//MapTest.md) - - [MixedPropertiesAndAdditionalPropertiesClass](doc//MixedPropertiesAndAdditionalPropertiesClass.md) - - [Model200Response](doc//Model200Response.md) - - [ModelClient](doc//ModelClient.md) - - [ModelFile](doc//ModelFile.md) - - [ModelList](doc//ModelList.md) - - [ModelReturn](doc//ModelReturn.md) - - [Name](doc//Name.md) - - [NullableClass](doc//NullableClass.md) - - [NumberOnly](doc//NumberOnly.md) - - [Order](doc//Order.md) - - [OuterComposite](doc//OuterComposite.md) - - [OuterEnum](doc//OuterEnum.md) - - [OuterEnumDefaultValue](doc//OuterEnumDefaultValue.md) - - [OuterEnumInteger](doc//OuterEnumInteger.md) - - [OuterEnumIntegerDefaultValue](doc//OuterEnumIntegerDefaultValue.md) - - [OuterObjectWithEnumProperty](doc//OuterObjectWithEnumProperty.md) - - [Pet](doc//Pet.md) - - [ReadOnlyFirst](doc//ReadOnlyFirst.md) - - [SpecialModelName](doc//SpecialModelName.md) - - [Tag](doc//Tag.md) - - [User](doc//User.md) + - [AdditionalPropertiesClass](doc\/AdditionalPropertiesClass.md) + - [Animal](doc\/Animal.md) + - [ApiResponse](doc\/ApiResponse.md) + - [ArrayOfArrayOfNumberOnly](doc\/ArrayOfArrayOfNumberOnly.md) + - [ArrayOfNumberOnly](doc\/ArrayOfNumberOnly.md) + - [ArrayTest](doc\/ArrayTest.md) + - [Capitalization](doc\/Capitalization.md) + - [Cat](doc\/Cat.md) + - [CatAllOf](doc\/CatAllOf.md) + - [Category](doc\/Category.md) + - [ClassModel](doc\/ClassModel.md) + - [Dog](doc\/Dog.md) + - [DogAllOf](doc\/DogAllOf.md) + - [EnumArrays](doc\/EnumArrays.md) + - [EnumClass](doc\/EnumClass.md) + - [EnumTest](doc\/EnumTest.md) + - [FileSchemaTestClass](doc\/FileSchemaTestClass.md) + - [Foo](doc\/Foo.md) + - [FormatTest](doc\/FormatTest.md) + - [HasOnlyReadOnly](doc\/HasOnlyReadOnly.md) + - [HealthCheckResult](doc\/HealthCheckResult.md) + - [InlineResponseDefault](doc\/InlineResponseDefault.md) + - [MapTest](doc\/MapTest.md) + - [MixedPropertiesAndAdditionalPropertiesClass](doc\/MixedPropertiesAndAdditionalPropertiesClass.md) + - [Model200Response](doc\/Model200Response.md) + - [ModelClient](doc\/ModelClient.md) + - [ModelFile](doc\/ModelFile.md) + - [ModelList](doc\/ModelList.md) + - [ModelReturn](doc\/ModelReturn.md) + - [Name](doc\/Name.md) + - [NullableClass](doc\/NullableClass.md) + - [NumberOnly](doc\/NumberOnly.md) + - [Order](doc\/Order.md) + - [OuterComposite](doc\/OuterComposite.md) + - [OuterEnum](doc\/OuterEnum.md) + - [OuterEnumDefaultValue](doc\/OuterEnumDefaultValue.md) + - [OuterEnumInteger](doc\/OuterEnumInteger.md) + - [OuterEnumIntegerDefaultValue](doc\/OuterEnumIntegerDefaultValue.md) + - [OuterObjectWithEnumProperty](doc\/OuterObjectWithEnumProperty.md) + - [Pet](doc\/Pet.md) + - [ReadOnlyFirst](doc\/ReadOnlyFirst.md) + - [SpecialModelName](doc\/SpecialModelName.md) + - [Tag](doc\/Tag.md) + - [User](doc\/User.md) ## Documentation For Authorization diff --git a/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Controllers/PetApi.cs b/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Controllers/PetApi.cs index d58ff968d3c..04aa969cb95 100644 --- a/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Controllers/PetApi.cs +++ b/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Controllers/PetApi.cs @@ -86,7 +86,7 @@ namespace Org.OpenAPITools.Controllers //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); string exampleJson = null; - exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; + exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; exampleJson = "\n 123456789\n doggie\n \n aeiou\n \n \n \n aeiou\n"; var example = exampleJson != null @@ -116,7 +116,7 @@ namespace Org.OpenAPITools.Controllers //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); string exampleJson = null; - exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; + exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; exampleJson = "\n 123456789\n doggie\n \n aeiou\n \n \n \n aeiou\n"; var example = exampleJson != null @@ -150,7 +150,7 @@ namespace Org.OpenAPITools.Controllers //TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(404); string exampleJson = null; - exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; + exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; exampleJson = "\n 123456789\n doggie\n \n aeiou\n \n \n \n aeiou\n"; var example = exampleJson != null @@ -225,7 +225,7 @@ namespace Org.OpenAPITools.Controllers //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(200, default(ApiResponse)); string exampleJson = null; - exampleJson = "{\n \"code\" : 0,\n \"type\" : \"type\",\n \"message\" : \"message\"\n}"; + exampleJson = "{\r\n \"code\" : 0,\r\n \"type\" : \"type\",\r\n \"message\" : \"message\"\r\n}"; var example = exampleJson != null ? JsonConvert.DeserializeObject(exampleJson) diff --git a/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Controllers/StoreApi.cs b/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Controllers/StoreApi.cs index 79c62f5c672..cb4da58b610 100644 --- a/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Controllers/StoreApi.cs +++ b/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Controllers/StoreApi.cs @@ -98,7 +98,7 @@ namespace Org.OpenAPITools.Controllers //TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(404); string exampleJson = null; - exampleJson = "{\n \"petId\" : 6,\n \"quantity\" : 1,\n \"id\" : 0,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"complete\" : false,\n \"status\" : \"placed\"\n}"; + exampleJson = "{\r\n \"petId\" : 6,\r\n \"quantity\" : 1,\r\n \"id\" : 0,\r\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"complete\" : false,\r\n \"status\" : \"placed\"\r\n}"; exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n"; var example = exampleJson != null @@ -127,7 +127,7 @@ namespace Org.OpenAPITools.Controllers //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); string exampleJson = null; - exampleJson = "{\n \"petId\" : 6,\n \"quantity\" : 1,\n \"id\" : 0,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"complete\" : false,\n \"status\" : \"placed\"\n}"; + exampleJson = "{\r\n \"petId\" : 6,\r\n \"quantity\" : 1,\r\n \"id\" : 0,\r\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"complete\" : false,\r\n \"status\" : \"placed\"\r\n}"; exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n"; var example = exampleJson != null diff --git a/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Controllers/UserApi.cs b/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Controllers/UserApi.cs index 17fdac817ad..c4f77f108ac 100644 --- a/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Controllers/UserApi.cs +++ b/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Controllers/UserApi.cs @@ -127,7 +127,7 @@ namespace Org.OpenAPITools.Controllers //TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(404); string exampleJson = null; - exampleJson = "{\n \"firstName\" : \"firstName\",\n \"lastName\" : \"lastName\",\n \"password\" : \"password\",\n \"userStatus\" : 6,\n \"phone\" : \"phone\",\n \"id\" : 0,\n \"email\" : \"email\",\n \"username\" : \"username\"\n}"; + exampleJson = "{\r\n \"firstName\" : \"firstName\",\r\n \"lastName\" : \"lastName\",\r\n \"password\" : \"password\",\r\n \"userStatus\" : 6,\r\n \"phone\" : \"phone\",\r\n \"id\" : 0,\r\n \"email\" : \"email\",\r\n \"username\" : \"username\"\r\n}"; exampleJson = "\n 123456789\n aeiou\n aeiou\n aeiou\n aeiou\n aeiou\n aeiou\n 123\n"; var example = exampleJson != null diff --git a/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Controllers/PetApi.cs b/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Controllers/PetApi.cs index d58ff968d3c..04aa969cb95 100644 --- a/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Controllers/PetApi.cs +++ b/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Controllers/PetApi.cs @@ -86,7 +86,7 @@ namespace Org.OpenAPITools.Controllers //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); string exampleJson = null; - exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; + exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; exampleJson = "\n 123456789\n doggie\n \n aeiou\n \n \n \n aeiou\n"; var example = exampleJson != null @@ -116,7 +116,7 @@ namespace Org.OpenAPITools.Controllers //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); string exampleJson = null; - exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; + exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; exampleJson = "\n 123456789\n doggie\n \n aeiou\n \n \n \n aeiou\n"; var example = exampleJson != null @@ -150,7 +150,7 @@ namespace Org.OpenAPITools.Controllers //TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(404); string exampleJson = null; - exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; + exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; exampleJson = "\n 123456789\n doggie\n \n aeiou\n \n \n \n aeiou\n"; var example = exampleJson != null @@ -225,7 +225,7 @@ namespace Org.OpenAPITools.Controllers //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(200, default(ApiResponse)); string exampleJson = null; - exampleJson = "{\n \"code\" : 0,\n \"type\" : \"type\",\n \"message\" : \"message\"\n}"; + exampleJson = "{\r\n \"code\" : 0,\r\n \"type\" : \"type\",\r\n \"message\" : \"message\"\r\n}"; var example = exampleJson != null ? JsonConvert.DeserializeObject(exampleJson) diff --git a/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Controllers/StoreApi.cs b/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Controllers/StoreApi.cs index 79c62f5c672..cb4da58b610 100644 --- a/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Controllers/StoreApi.cs +++ b/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Controllers/StoreApi.cs @@ -98,7 +98,7 @@ namespace Org.OpenAPITools.Controllers //TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(404); string exampleJson = null; - exampleJson = "{\n \"petId\" : 6,\n \"quantity\" : 1,\n \"id\" : 0,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"complete\" : false,\n \"status\" : \"placed\"\n}"; + exampleJson = "{\r\n \"petId\" : 6,\r\n \"quantity\" : 1,\r\n \"id\" : 0,\r\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"complete\" : false,\r\n \"status\" : \"placed\"\r\n}"; exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n"; var example = exampleJson != null @@ -127,7 +127,7 @@ namespace Org.OpenAPITools.Controllers //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); string exampleJson = null; - exampleJson = "{\n \"petId\" : 6,\n \"quantity\" : 1,\n \"id\" : 0,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"complete\" : false,\n \"status\" : \"placed\"\n}"; + exampleJson = "{\r\n \"petId\" : 6,\r\n \"quantity\" : 1,\r\n \"id\" : 0,\r\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"complete\" : false,\r\n \"status\" : \"placed\"\r\n}"; exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n"; var example = exampleJson != null diff --git a/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Controllers/UserApi.cs b/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Controllers/UserApi.cs index 17fdac817ad..c4f77f108ac 100644 --- a/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Controllers/UserApi.cs +++ b/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Controllers/UserApi.cs @@ -127,7 +127,7 @@ namespace Org.OpenAPITools.Controllers //TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(404); string exampleJson = null; - exampleJson = "{\n \"firstName\" : \"firstName\",\n \"lastName\" : \"lastName\",\n \"password\" : \"password\",\n \"userStatus\" : 6,\n \"phone\" : \"phone\",\n \"id\" : 0,\n \"email\" : \"email\",\n \"username\" : \"username\"\n}"; + exampleJson = "{\r\n \"firstName\" : \"firstName\",\r\n \"lastName\" : \"lastName\",\r\n \"password\" : \"password\",\r\n \"userStatus\" : 6,\r\n \"phone\" : \"phone\",\r\n \"id\" : 0,\r\n \"email\" : \"email\",\r\n \"username\" : \"username\"\r\n}"; exampleJson = "\n 123456789\n aeiou\n aeiou\n aeiou\n aeiou\n aeiou\n aeiou\n 123\n"; var example = exampleJson != null diff --git a/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Controllers/PetApi.cs b/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Controllers/PetApi.cs index 3162f82261b..c99e55e5f2d 100644 --- a/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Controllers/PetApi.cs +++ b/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Controllers/PetApi.cs @@ -48,7 +48,7 @@ namespace Org.OpenAPITools.Controllers //TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(405); string exampleJson = null; - exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; + exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; exampleJson = "\n 123456789\n doggie\n \n aeiou\n \n \n \n aeiou\n"; var example = exampleJson != null @@ -97,7 +97,7 @@ namespace Org.OpenAPITools.Controllers //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); string exampleJson = null; - exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; + exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; exampleJson = "\n 123456789\n doggie\n \n aeiou\n \n \n \n aeiou\n"; var example = exampleJson != null @@ -127,7 +127,7 @@ namespace Org.OpenAPITools.Controllers //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); string exampleJson = null; - exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; + exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; exampleJson = "\n 123456789\n doggie\n \n aeiou\n \n \n \n aeiou\n"; var example = exampleJson != null @@ -161,7 +161,7 @@ namespace Org.OpenAPITools.Controllers //TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(404); string exampleJson = null; - exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; + exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; exampleJson = "\n 123456789\n doggie\n \n aeiou\n \n \n \n aeiou\n"; var example = exampleJson != null @@ -197,7 +197,7 @@ namespace Org.OpenAPITools.Controllers //TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(405); string exampleJson = null; - exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; + exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; exampleJson = "\n 123456789\n doggie\n \n aeiou\n \n \n \n aeiou\n"; var example = exampleJson != null @@ -247,7 +247,7 @@ namespace Org.OpenAPITools.Controllers //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(200, default(ApiResponse)); string exampleJson = null; - exampleJson = "{\n \"code\" : 0,\n \"type\" : \"type\",\n \"message\" : \"message\"\n}"; + exampleJson = "{\r\n \"code\" : 0,\r\n \"type\" : \"type\",\r\n \"message\" : \"message\"\r\n}"; var example = exampleJson != null ? JsonConvert.DeserializeObject(exampleJson) diff --git a/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Controllers/StoreApi.cs b/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Controllers/StoreApi.cs index 431fccf1905..881cd5107a9 100644 --- a/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Controllers/StoreApi.cs +++ b/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Controllers/StoreApi.cs @@ -98,7 +98,7 @@ namespace Org.OpenAPITools.Controllers //TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(404); string exampleJson = null; - exampleJson = "{\n \"petId\" : 6,\n \"quantity\" : 1,\n \"id\" : 0,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"complete\" : false,\n \"status\" : \"placed\"\n}"; + exampleJson = "{\r\n \"petId\" : 6,\r\n \"quantity\" : 1,\r\n \"id\" : 0,\r\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"complete\" : false,\r\n \"status\" : \"placed\"\r\n}"; exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n"; var example = exampleJson != null @@ -128,7 +128,7 @@ namespace Org.OpenAPITools.Controllers //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); string exampleJson = null; - exampleJson = "{\n \"petId\" : 6,\n \"quantity\" : 1,\n \"id\" : 0,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"complete\" : false,\n \"status\" : \"placed\"\n}"; + exampleJson = "{\r\n \"petId\" : 6,\r\n \"quantity\" : 1,\r\n \"id\" : 0,\r\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"complete\" : false,\r\n \"status\" : \"placed\"\r\n}"; exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n"; var example = exampleJson != null diff --git a/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Controllers/UserApi.cs b/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Controllers/UserApi.cs index 406c969ffb2..327c18b8687 100644 --- a/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Controllers/UserApi.cs +++ b/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Controllers/UserApi.cs @@ -134,7 +134,7 @@ namespace Org.OpenAPITools.Controllers //TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(404); string exampleJson = null; - exampleJson = "{\n \"firstName\" : \"firstName\",\n \"lastName\" : \"lastName\",\n \"password\" : \"password\",\n \"userStatus\" : 6,\n \"phone\" : \"phone\",\n \"id\" : 0,\n \"email\" : \"email\",\n \"username\" : \"username\"\n}"; + exampleJson = "{\r\n \"firstName\" : \"firstName\",\r\n \"lastName\" : \"lastName\",\r\n \"password\" : \"password\",\r\n \"userStatus\" : 6,\r\n \"phone\" : \"phone\",\r\n \"id\" : 0,\r\n \"email\" : \"email\",\r\n \"username\" : \"username\"\r\n}"; exampleJson = "\n 123456789\n aeiou\n aeiou\n aeiou\n aeiou\n aeiou\n aeiou\n 123\n"; var example = exampleJson != null diff --git a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/PetApi.cs b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/PetApi.cs index 68722c6b4cb..6f7fae5e120 100644 --- a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/PetApi.cs +++ b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/PetApi.cs @@ -86,7 +86,7 @@ namespace Org.OpenAPITools.Controllers //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); string exampleJson = null; - exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; + exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; exampleJson = "\n 123456789\n doggie\n \n aeiou\n \n \n \n aeiou\n"; var example = exampleJson != null @@ -116,7 +116,7 @@ namespace Org.OpenAPITools.Controllers //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); string exampleJson = null; - exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; + exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; exampleJson = "\n 123456789\n doggie\n \n aeiou\n \n \n \n aeiou\n"; var example = exampleJson != null @@ -150,7 +150,7 @@ namespace Org.OpenAPITools.Controllers //TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(404); string exampleJson = null; - exampleJson = "{\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\n \"name\" : \"doggie\",\n \"id\" : 0,\n \"category\" : {\n \"name\" : \"name\",\n \"id\" : 6\n },\n \"tags\" : [ {\n \"name\" : \"name\",\n \"id\" : 1\n }, {\n \"name\" : \"name\",\n \"id\" : 1\n } ],\n \"status\" : \"available\"\n}"; + exampleJson = "{\r\n \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ],\r\n \"name\" : \"doggie\",\r\n \"id\" : 0,\r\n \"category\" : {\r\n \"name\" : \"name\",\r\n \"id\" : 6\r\n },\r\n \"tags\" : [ {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n }, {\r\n \"name\" : \"name\",\r\n \"id\" : 1\r\n } ],\r\n \"status\" : \"available\"\r\n}"; exampleJson = "\n 123456789\n doggie\n \n aeiou\n \n \n \n aeiou\n"; var example = exampleJson != null @@ -225,7 +225,7 @@ namespace Org.OpenAPITools.Controllers //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(200, default(ApiResponse)); string exampleJson = null; - exampleJson = "{\n \"code\" : 0,\n \"type\" : \"type\",\n \"message\" : \"message\"\n}"; + exampleJson = "{\r\n \"code\" : 0,\r\n \"type\" : \"type\",\r\n \"message\" : \"message\"\r\n}"; var example = exampleJson != null ? JsonConvert.DeserializeObject(exampleJson) diff --git a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/StoreApi.cs b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/StoreApi.cs index 4503e177b9c..213f6a8479e 100644 --- a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/StoreApi.cs +++ b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/StoreApi.cs @@ -98,7 +98,7 @@ namespace Org.OpenAPITools.Controllers //TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(404); string exampleJson = null; - exampleJson = "{\n \"petId\" : 6,\n \"quantity\" : 1,\n \"id\" : 0,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"complete\" : false,\n \"status\" : \"placed\"\n}"; + exampleJson = "{\r\n \"petId\" : 6,\r\n \"quantity\" : 1,\r\n \"id\" : 0,\r\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"complete\" : false,\r\n \"status\" : \"placed\"\r\n}"; exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n"; var example = exampleJson != null @@ -127,7 +127,7 @@ namespace Org.OpenAPITools.Controllers //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); string exampleJson = null; - exampleJson = "{\n \"petId\" : 6,\n \"quantity\" : 1,\n \"id\" : 0,\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\n \"complete\" : false,\n \"status\" : \"placed\"\n}"; + exampleJson = "{\r\n \"petId\" : 6,\r\n \"quantity\" : 1,\r\n \"id\" : 0,\r\n \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"complete\" : false,\r\n \"status\" : \"placed\"\r\n}"; exampleJson = "\n 123456789\n 123456789\n 123\n 2000-01-23T04:56:07.000Z\n aeiou\n true\n"; var example = exampleJson != null diff --git a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/UserApi.cs b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/UserApi.cs index 06ca8107d07..b4752ae73d1 100644 --- a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/UserApi.cs +++ b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/UserApi.cs @@ -127,7 +127,7 @@ namespace Org.OpenAPITools.Controllers //TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(404); string exampleJson = null; - exampleJson = "{\n \"firstName\" : \"firstName\",\n \"lastName\" : \"lastName\",\n \"password\" : \"password\",\n \"userStatus\" : 6,\n \"phone\" : \"phone\",\n \"id\" : 0,\n \"email\" : \"email\",\n \"username\" : \"username\"\n}"; + exampleJson = "{\r\n \"firstName\" : \"firstName\",\r\n \"lastName\" : \"lastName\",\r\n \"password\" : \"password\",\r\n \"userStatus\" : 6,\r\n \"phone\" : \"phone\",\r\n \"id\" : 0,\r\n \"email\" : \"email\",\r\n \"username\" : \"username\"\r\n}"; exampleJson = "\n 123456789\n aeiou\n aeiou\n aeiou\n aeiou\n aeiou\n aeiou\n 123\n"; var example = exampleJson != null diff --git a/samples/server/petstore/php-slim4/README.md b/samples/server/petstore/php-slim4/README.md index 3f5c820198c..78d2322ebb7 100644 --- a/samples/server/petstore/php-slim4/README.md +++ b/samples/server/petstore/php-slim4/README.md @@ -168,10 +168,10 @@ Class | Method | HTTP request | Description ## Authentication ### Security schema `api_key` -> Important! To make ApiKey authentication work you need to extend [\OpenAPIServer\Auth\AbstractAuthenticator](./lib/Auth/AbstractAuthenticator.php) class by [\OpenAPIServer\Auth\ApiKeyAuthenticator](./src/Auth/ApiKeyAuthenticator.php) class. +> Important! To make ApiKey authentication work you need to extend [\OpenAPIServer\Auth\AbstractAuthenticator](./lib\/Auth/AbstractAuthenticator.php) class by [\OpenAPIServer\Auth\ApiKeyAuthenticator](./src/Auth/ApiKeyAuthenticator.php) class. ### Security schema `petstore_auth` -> Important! To make OAuth authentication work you need to extend [\OpenAPIServer\Auth\AbstractAuthenticator](./lib/Auth/AbstractAuthenticator.php) class by [\OpenAPIServer\Auth\OAuthAuthenticator](./src/Auth/OAuthAuthenticator.php) class. +> Important! To make OAuth authentication work you need to extend [\OpenAPIServer\Auth\AbstractAuthenticator](./lib\/Auth/AbstractAuthenticator.php) class by [\OpenAPIServer\Auth\OAuthAuthenticator](./src/Auth/OAuthAuthenticator.php) class. Scope list: * `write:pets` - modify pets in your account diff --git a/samples/server/petstore/php-slim4/phpunit.xml.dist b/samples/server/petstore/php-slim4/phpunit.xml.dist index 3efb4b45f4a..10eaa652957 100644 --- a/samples/server/petstore/php-slim4/phpunit.xml.dist +++ b/samples/server/petstore/php-slim4/phpunit.xml.dist @@ -21,9 +21,9 @@ - ./lib/Api + ./lib\/Api ./lib/BaseModel.php - ./lib/Model + ./lib\/Model diff --git a/samples/server/petstore/php-symfony/SymfonyBundle-php/phpunit.xml.dist b/samples/server/petstore/php-symfony/SymfonyBundle-php/phpunit.xml.dist index e754829e628..40d39d2f5a8 100644 --- a/samples/server/petstore/php-symfony/SymfonyBundle-php/phpunit.xml.dist +++ b/samples/server/petstore/php-symfony/SymfonyBundle-php/phpunit.xml.dist @@ -14,9 +14,9 @@ - ././Api - ././Model - ././Controller + ./.\/Api + ./.\/Model + ./.\/Controller diff --git a/samples/server/petstore/python-aiohttp-srclayout/setup.py b/samples/server/petstore/python-aiohttp-srclayout/setup.py index 6f62aec4414..600b620958c 100644 --- a/samples/server/petstore/python-aiohttp-srclayout/setup.py +++ b/samples/server/petstore/python-aiohttp-srclayout/setup.py @@ -27,9 +27,9 @@ setup( url="", keywords=["OpenAPI", "OpenAPI Petstore"], install_requires=REQUIRES, - packages=find_packages("src/"), - package_dir={"": "src/"}, - package_data={'': ['src//openapi/openapi.yaml']}, + packages=find_packages("src\"), + package_dir={"": "src\"}, + package_data={'': ['src\/openapi/openapi.yaml']}, include_package_data=True, entry_points={ 'console_scripts': ['openapi_server=openapi_server.__main__:main']}, diff --git a/samples/server/petstore/python-aiohttp-srclayout/tests/conftest.py b/samples/server/petstore/python-aiohttp-srclayout/tests/conftest.py index 578bf18e982..63ba2f413d1 100644 --- a/samples/server/petstore/python-aiohttp-srclayout/tests/conftest.py +++ b/samples/server/petstore/python-aiohttp-srclayout/tests/conftest.py @@ -12,7 +12,7 @@ def client(loop, aiohttp_client): "swagger_ui": True } specification_dir = os.path.join(os.path.dirname(__file__), '..', - "src/", + "src\", 'openapi_server', 'openapi') app = connexion.AioHttpApp(__name__, specification_dir=specification_dir, diff --git a/samples/server/petstore/python-aiohttp-srclayout/tox.ini b/samples/server/petstore/python-aiohttp-srclayout/tox.ini index 25d12bb84c0..3d847999b3c 100644 --- a/samples/server/petstore/python-aiohttp-srclayout/tox.ini +++ b/samples/server/petstore/python-aiohttp-srclayout/tox.ini @@ -8,4 +8,4 @@ deps=-r{toxinidir}/requirements.txt {toxinidir} commands= - pytest --cov=src/openapi_server + pytest --cov=src\openapi_server