├── src ├── main │ ├── resources │ │ ├── handlebars │ │ │ ├── Java │ │ │ │ ├── build.sbt.mustache │ │ │ │ ├── settings.gradle.mustache │ │ │ │ ├── gradle.properties.mustache │ │ │ │ ├── beanValidationQueryParams.mustache │ │ │ │ ├── libraries │ │ │ │ │ ├── retrofit │ │ │ │ │ │ ├── cookieParams.mustache │ │ │ │ │ │ ├── bodyParams.mustache │ │ │ │ │ │ ├── pathParams.mustache │ │ │ │ │ │ ├── queryParams.mustache │ │ │ │ │ │ ├── headerParams.mustache │ │ │ │ │ │ └── formParams.mustache │ │ │ │ │ ├── retrofit2 │ │ │ │ │ │ ├── cookieParams.mustache │ │ │ │ │ │ ├── bodyParams.mustache │ │ │ │ │ │ ├── pathParams.mustache │ │ │ │ │ │ ├── headerParams.mustache │ │ │ │ │ │ ├── queryParams.mustache │ │ │ │ │ │ └── formParams.mustache │ │ │ │ │ ├── resttemplate │ │ │ │ │ │ └── auth │ │ │ │ │ │ │ ├── OAuthFlow.mustache │ │ │ │ │ │ │ └── Authentication.mustache │ │ │ │ │ └── feign │ │ │ │ │ │ └── ParamExpander.mustache │ │ │ │ ├── gradle-wrapper.jar │ │ │ │ ├── manifest.mustache │ │ │ │ ├── model_doc.mustache │ │ │ │ ├── auth │ │ │ │ │ ├── OAuthFlow.mustache │ │ │ │ │ └── Authentication.mustache │ │ │ │ ├── enum_outer_doc.mustache │ │ │ │ ├── generatedAnnotation.mustache │ │ │ │ ├── gradle-wrapper.properties.mustache │ │ │ │ ├── gitignore.mustache │ │ │ │ ├── licenseInfo.mustache │ │ │ │ ├── travis.mustache │ │ │ │ ├── xmlAnnotation.mustache │ │ │ │ ├── beanValidation.mustache │ │ │ │ ├── typeInfoAnnotation.mustache │ │ │ │ └── RFC3339DateFormat.mustache │ │ │ ├── go │ │ │ │ ├── swagger.mustache │ │ │ │ ├── .travis.yml │ │ │ │ ├── gitignore.mustache │ │ │ │ └── partial_header.mustache │ │ │ ├── pythonFlaskConnexion │ │ │ │ ├── __init__.mustache │ │ │ │ ├── swagger.mustache │ │ │ │ ├── test-requirements.mustache │ │ │ │ ├── requirements.mustache │ │ │ │ ├── tox.mustache │ │ │ │ ├── __init__model.mustache │ │ │ │ ├── param_type.mustache │ │ │ │ ├── travis.mustache │ │ │ │ ├── __init__test.mustache │ │ │ │ └── __main__.mustache │ │ │ ├── javascript │ │ │ │ ├── mocha.opts │ │ │ │ ├── es6 │ │ │ │ │ ├── mocha.opts │ │ │ │ │ ├── travis.yml │ │ │ │ │ ├── api-test-response-complex.mustache │ │ │ │ │ ├── api-test-response.mustache │ │ │ │ │ ├── model.mustache │ │ │ │ │ ├── licenseInfo.mustache │ │ │ │ │ ├── enumClass.mustache │ │ │ │ │ └── partial_model_inner_enum.mustache │ │ │ │ ├── travis.yml │ │ │ │ ├── .babelrc.mustache │ │ │ │ ├── licenseInfo.mustache │ │ │ │ ├── enumClass.mustache │ │ │ │ └── partial_model_inner_enum.mustache │ │ │ ├── nodejs │ │ │ │ ├── swagger.mustache │ │ │ │ └── package.mustache │ │ │ ├── python │ │ │ │ ├── __init__test.mustache │ │ │ │ ├── requirements.mustache │ │ │ │ ├── __init__api.mustache │ │ │ │ ├── test-requirements.mustache │ │ │ │ ├── __init__model.mustache │ │ │ │ ├── tox.mustache │ │ │ │ ├── partial_header.mustache │ │ │ │ ├── travis.mustache │ │ │ │ └── __init__package.mustache │ │ │ ├── swagger-static │ │ │ │ ├── assets │ │ │ │ │ ├── css │ │ │ │ │ │ └── site.css │ │ │ │ │ └── images │ │ │ │ │ │ └── logo.png │ │ │ │ ├── main.mustache │ │ │ │ ├── package.mustache │ │ │ │ └── model.mustache │ │ │ ├── go-server │ │ │ │ ├── swagger.mustache │ │ │ │ ├── Dockerfile │ │ │ │ ├── controller-api.mustache │ │ │ │ ├── partial_header.mustache │ │ │ │ ├── main.mustache │ │ │ │ └── logger.mustache │ │ │ ├── JavaInflector │ │ │ │ ├── openapi3.mustache │ │ │ │ ├── bodyParams.mustache │ │ │ │ ├── pathParams.mustache │ │ │ │ ├── headerParams.mustache │ │ │ │ ├── queryParams.mustache │ │ │ │ ├── README.mustache │ │ │ │ ├── formParams.mustache │ │ │ │ ├── generatedAnnotation.mustache │ │ │ │ ├── interface.mustache │ │ │ │ ├── inflector.mustache │ │ │ │ ├── typeInfoAnnotation.mustache │ │ │ │ └── model.mustache │ │ │ ├── JavaSpring │ │ │ │ ├── project │ │ │ │ │ ├── build.properties │ │ │ │ │ └── plugins.sbt │ │ │ │ ├── beanValidationQueryParams.mustache │ │ │ │ ├── beanValidationPathParams.mustache │ │ │ │ ├── application.properties.mustache │ │ │ │ ├── optionalDataType.mustache │ │ │ │ ├── exampleReturnTypes.mustache │ │ │ │ ├── libraries │ │ │ │ │ ├── spring-boot3 │ │ │ │ │ │ ├── application.mustache │ │ │ │ │ │ └── homeController.mustache │ │ │ │ │ ├── spring-cloud │ │ │ │ │ │ └── application-test.mustache │ │ │ │ │ ├── spring-mvc │ │ │ │ │ │ └── webMvcConfiguration.mustache │ │ │ │ │ └── spring-boot │ │ │ │ │ │ └── homeController.mustache │ │ │ │ ├── generatedAnnotation.mustache │ │ │ │ ├── returnTypes.mustache │ │ │ │ ├── implicitHeader.mustache │ │ │ │ ├── apiException.mustache │ │ │ │ ├── notFoundException.mustache │ │ │ │ ├── beanValidation.mustache │ │ │ │ ├── xmlAnnotation.mustache │ │ │ │ ├── allowableValues.mustache │ │ │ │ ├── TestUtils.mustache │ │ │ │ ├── typeInfoAnnotation.mustache │ │ │ │ ├── allowableValuesAndDefaultValue.mustache │ │ │ │ ├── application.mustache │ │ │ │ └── NotUndefined.mustache │ │ │ ├── codegen │ │ │ │ ├── services.mustache │ │ │ │ ├── model.template │ │ │ │ └── myFile.template │ │ │ ├── ruby │ │ │ │ ├── rspec.mustache │ │ │ │ ├── version.mustache │ │ │ │ ├── Rakefile.mustache │ │ │ │ ├── Gemfile.mustache │ │ │ │ ├── model.mustache │ │ │ │ ├── api_info.mustache │ │ │ │ ├── model_doc.mustache │ │ │ │ └── partial_model_enum_class.mustache │ │ │ ├── JavaJaxRS │ │ │ │ ├── cxf │ │ │ │ │ ├── server │ │ │ │ │ │ ├── application.properties.mustache │ │ │ │ │ │ └── jboss-web.xml.mustache │ │ │ │ │ ├── bodyParamsImpl.mustache │ │ │ │ │ ├── pathParamsImpl.mustache │ │ │ │ │ ├── cookieParamsImpl.mustache │ │ │ │ │ ├── headerParamsImpl.mustache │ │ │ │ │ ├── queryParamsImpl.mustache │ │ │ │ │ ├── beanValidationQueryParams.mustache │ │ │ │ │ ├── beanValidationPathParams.mustache │ │ │ │ │ ├── cookieParams.mustache │ │ │ │ │ ├── headerParams.mustache │ │ │ │ │ ├── bodyParams.mustache │ │ │ │ │ ├── formParamsImpl.mustache │ │ │ │ │ ├── pathParams.mustache │ │ │ │ │ ├── returnTypes.mustache │ │ │ │ │ ├── generatedAnnotation.mustache │ │ │ │ │ ├── beanValidation.mustache │ │ │ │ │ ├── queryParams.mustache │ │ │ │ │ ├── formParams.mustache │ │ │ │ │ ├── interface.mustache │ │ │ │ │ ├── allowableValues.mustache │ │ │ │ │ └── model.mustache │ │ │ │ ├── spec │ │ │ │ │ ├── returnTypeInterface.mustache │ │ │ │ │ ├── beanValidationQueryParams.mustache │ │ │ │ │ ├── beanValidationPathParams.mustache │ │ │ │ │ ├── bodyParams.mustache │ │ │ │ │ ├── generatedAnnotation.mustache │ │ │ │ │ ├── beanValidation.mustache │ │ │ │ │ ├── formParams.mustache │ │ │ │ │ ├── interface.mustache │ │ │ │ │ ├── RestApplication.mustache │ │ │ │ │ ├── pathParams.mustache │ │ │ │ │ ├── headerParams.mustache │ │ │ │ │ ├── queryParams.mustache │ │ │ │ │ └── allowableValues.mustache │ │ │ │ ├── libraries │ │ │ │ │ └── jersey1 │ │ │ │ │ │ └── project │ │ │ │ │ │ ├── build.properties │ │ │ │ │ │ └── plugins.sbt │ │ │ │ ├── resteasy │ │ │ │ │ ├── settingsGradle.mustache │ │ │ │ │ ├── eap │ │ │ │ │ │ ├── settingsGradle.mustache │ │ │ │ │ │ ├── serviceBodyParams.mustache │ │ │ │ │ │ ├── serviceHeaderParams.mustache │ │ │ │ │ │ ├── servicePathParams.mustache │ │ │ │ │ │ ├── serviceQueryParams.mustache │ │ │ │ │ │ ├── serviceCookieParams.mustache │ │ │ │ │ │ ├── jboss-web.mustache │ │ │ │ │ │ ├── comma.mustache │ │ │ │ │ │ ├── serviceFormParams.mustache │ │ │ │ │ │ ├── pathParams.mustache │ │ │ │ │ │ ├── queryParams.mustache │ │ │ │ │ │ ├── enumOuterClass.mustache │ │ │ │ │ │ ├── generatedAnnotation.mustache │ │ │ │ │ │ ├── interface.mustache │ │ │ │ │ │ ├── bodyParams.mustache │ │ │ │ │ │ ├── cookieParams.mustache │ │ │ │ │ │ ├── allowableValues.mustache │ │ │ │ │ │ ├── web.mustache │ │ │ │ │ │ ├── headerParams.mustache │ │ │ │ │ │ └── formParams.mustache │ │ │ │ │ ├── serviceBodyParams.mustache │ │ │ │ │ ├── servicePathParams.mustache │ │ │ │ │ ├── serviceQueryParams.mustache │ │ │ │ │ ├── beanValidationQueryParams.mustache │ │ │ │ │ ├── serviceCookieParams.mustache │ │ │ │ │ ├── serviceHeaderParams.mustache │ │ │ │ │ ├── jboss-web.mustache │ │ │ │ │ ├── comma.mustache │ │ │ │ │ ├── beanValidationPathParams.mustache │ │ │ │ │ ├── serviceFormParams.mustache │ │ │ │ │ ├── pathParams.mustache │ │ │ │ │ ├── generatedAnnotation.mustache │ │ │ │ │ ├── returnTypes.mustache │ │ │ │ │ ├── beanValidation.mustache │ │ │ │ │ ├── queryParams.mustache │ │ │ │ │ ├── ApiException.mustache │ │ │ │ │ ├── NotFoundException.mustache │ │ │ │ │ ├── RestApplication.mustache │ │ │ │ │ ├── bodyParams.mustache │ │ │ │ │ ├── allowableValues.mustache │ │ │ │ │ ├── cookieParams.mustache │ │ │ │ │ ├── headerParams.mustache │ │ │ │ │ ├── formParams.mustache │ │ │ │ │ ├── web.mustache │ │ │ │ │ └── RFC3339DateFormat.mustache │ │ │ │ ├── serviceBodyParams.mustache │ │ │ │ ├── beanValidationQueryParams.mustache │ │ │ │ ├── serviceCookieParams.mustache │ │ │ │ ├── serviceHeaderParams.mustache │ │ │ │ ├── cxf-cdi │ │ │ │ │ ├── serviceBodyParams.mustache │ │ │ │ │ ├── serviceHeaderParams.mustache │ │ │ │ │ ├── servicePathParams.mustache │ │ │ │ │ ├── serviceQueryParams.mustache │ │ │ │ │ ├── beanValidationQueryParams.mustache │ │ │ │ │ ├── beanValidationPathParams.mustache │ │ │ │ │ ├── serviceFormParams.mustache │ │ │ │ │ ├── generatedAnnotation.mustache │ │ │ │ │ ├── interface.mustache │ │ │ │ │ ├── formParams.mustache │ │ │ │ │ ├── RestApplication.mustache │ │ │ │ │ ├── beans.mustache │ │ │ │ │ ├── beanValidation.mustache │ │ │ │ │ ├── bodyParams.mustache │ │ │ │ │ ├── allowableValues.mustache │ │ │ │ │ ├── headerParams.mustache │ │ │ │ │ └── pathParams.mustache │ │ │ │ ├── beanValidationPathParams.mustache │ │ │ │ ├── servicePathParams.mustache │ │ │ │ ├── serviceQueryParams.mustache │ │ │ │ ├── generatedAnnotation.mustache │ │ │ │ ├── serviceFormParams.mustache │ │ │ │ ├── returnTypes.mustache │ │ │ │ ├── ApiException.mustache │ │ │ │ ├── NotFoundException.mustache │ │ │ │ ├── interface.mustache │ │ │ │ ├── licenseInfo.mustache │ │ │ │ ├── apiServiceFactory.mustache │ │ │ │ ├── beanValidation.mustache │ │ │ │ ├── allowableValues.mustache │ │ │ │ ├── cookieParams.mustache │ │ │ │ ├── typeInfoAnnotation.mustache │ │ │ │ ├── bodyParams.mustache │ │ │ │ ├── pathParams.mustache │ │ │ │ ├── headerParams.mustache │ │ │ │ └── RFC3339DateFormat.mustache │ │ │ ├── JavaMicronaut │ │ │ │ ├── project │ │ │ │ │ ├── build.properties │ │ │ │ │ └── plugins.sbt │ │ │ │ ├── publisher.mustache │ │ │ │ ├── beanValidationParams.mustache │ │ │ │ ├── bodyParams.mustache │ │ │ │ ├── nullableBeanValidationParams.mustache │ │ │ │ ├── optionalDataType.mustache │ │ │ │ ├── headerParams.mustache │ │ │ │ ├── cookieParams.mustache │ │ │ │ ├── exampleReturnTypes.mustache │ │ │ │ ├── generatedAnnotation.mustache │ │ │ │ ├── implicitHeader.mustache │ │ │ │ ├── returnTypes.mustache │ │ │ │ ├── pathParams.mustache │ │ │ │ ├── beanValidationParamsInner.mustache │ │ │ │ ├── queryParams.mustache │ │ │ │ ├── apiException.mustache │ │ │ │ ├── notFoundException.mustache │ │ │ │ ├── formParams.mustache │ │ │ │ ├── beanValidation.mustache │ │ │ │ ├── xmlAnnotation.mustache │ │ │ │ ├── typeInfoAnnotation.mustache │ │ │ │ └── application.mustache │ │ │ ├── R │ │ │ │ ├── Rbuildignore.mustache │ │ │ │ ├── NAMESPACE.mustache │ │ │ │ ├── response.mustache │ │ │ │ ├── partial_header.mustache │ │ │ │ ├── description.mustache │ │ │ │ └── element.mustache │ │ │ ├── dart │ │ │ │ ├── analysis_options.mustache │ │ │ │ ├── model.mustache │ │ │ │ ├── pubspec.mustache │ │ │ │ ├── auth │ │ │ │ │ ├── authentication.mustache │ │ │ │ │ ├── http_basic_auth.mustache │ │ │ │ │ └── oauth.mustache │ │ │ │ └── apilib.mustache │ │ │ ├── aspnetcore │ │ │ │ ├── wwwroot │ │ │ │ │ ├── swagger-original.mustache │ │ │ │ │ ├── index.html │ │ │ │ │ └── web.config │ │ │ │ ├── bodyParam.mustache │ │ │ │ ├── tags.mustache │ │ │ │ ├── appsettings.json │ │ │ │ ├── objectReturn.mustache │ │ │ │ ├── mapReturn.mustache │ │ │ │ ├── listReturn.mustache │ │ │ │ ├── NuGet.Config │ │ │ │ ├── build.sh.mustache │ │ │ │ ├── build.bat.mustache │ │ │ │ ├── partial_header.mustache │ │ │ │ ├── README.mustache │ │ │ │ ├── formParam.mustache │ │ │ │ ├── pathParam.mustache │ │ │ │ ├── Dockerfile.mustache │ │ │ │ ├── queryParam.mustache │ │ │ │ ├── headerParam.mustache │ │ │ │ ├── 2.1 │ │ │ │ │ └── Dockerfile.mustache │ │ │ │ ├── 3.0 │ │ │ │ │ └── Dockerfile.mustache │ │ │ │ └── web.config │ │ │ ├── kotlin-client │ │ │ │ ├── settings.gradle.mustache │ │ │ │ ├── model_doc.mustache │ │ │ │ ├── enum_doc.mustache │ │ │ │ ├── data_class_req_var.mustache │ │ │ │ ├── infrastructure │ │ │ │ │ ├── RequestMethod.kt.mustache │ │ │ │ │ ├── Serializer.kt.mustache │ │ │ │ │ └── RequestConfig.kt.mustache │ │ │ │ ├── data_class_opt_var.mustache │ │ │ │ ├── licenseInfo.mustache │ │ │ │ ├── enum_class.mustache │ │ │ │ └── model.mustache │ │ │ ├── kotlin-server │ │ │ │ ├── libraries │ │ │ │ │ └── ktor │ │ │ │ │ │ ├── gradle.properties │ │ │ │ │ │ ├── Dockerfile.mustache │ │ │ │ │ │ ├── _response.mustache │ │ │ │ │ │ ├── licenseInfo.mustache │ │ │ │ │ │ ├── _principal.mustache │ │ │ │ │ │ ├── logback.xml │ │ │ │ │ │ ├── _api_body.mustache │ │ │ │ │ │ └── application.conf.mustache │ │ │ │ ├── settings.gradle.mustache │ │ │ │ ├── model_doc.mustache │ │ │ │ ├── enum_doc.mustache │ │ │ │ ├── data_class_req_var.mustache │ │ │ │ ├── data_class_opt_var.mustache │ │ │ │ ├── enum_class.mustache │ │ │ │ ├── licenseInfo.mustache │ │ │ │ └── model.mustache │ │ │ ├── scala │ │ │ │ ├── client │ │ │ │ │ ├── settings.gradle.mustache │ │ │ │ │ ├── gradle.properties.mustache │ │ │ │ │ ├── gradle-wrapper.properties.mustache │ │ │ │ │ ├── gitignore.mustache │ │ │ │ │ ├── licenseInfo.mustache │ │ │ │ │ └── client.mustache │ │ │ │ └── akka-http-server │ │ │ │ │ ├── build.sbt.mustache │ │ │ │ │ └── model.mustache │ │ │ ├── swift4 │ │ │ │ ├── modelArray.mustache │ │ │ │ ├── modelEnum.mustache │ │ │ │ ├── Cartfile.mustache │ │ │ │ ├── modelInlineEnumDeclaration.mustache │ │ │ │ ├── _param.mustache │ │ │ │ ├── Configuration.mustache │ │ │ │ └── model.mustache │ │ │ ├── swift5 │ │ │ │ ├── modelArray.mustache │ │ │ │ ├── modelEnum.mustache │ │ │ │ ├── Cartfile.mustache │ │ │ │ ├── modelInlineEnumDeclaration.mustache │ │ │ │ ├── _param.mustache │ │ │ │ ├── Configuration.mustache │ │ │ │ └── model.mustache │ │ │ ├── typescript-fetch │ │ │ │ ├── gitignore │ │ │ │ ├── custom.d.mustache │ │ │ │ ├── index.mustache │ │ │ │ ├── api_test_default_value.mustache │ │ │ │ ├── modelEnum.mustache │ │ │ │ ├── licenseInfo.mustache │ │ │ │ ├── tsconfig.mustache │ │ │ │ └── modelAlias.mustache │ │ │ ├── JavaVertXServer │ │ │ │ ├── README.mustache │ │ │ │ ├── package-info-model.mustache │ │ │ │ ├── generatedAnnotation.mustache │ │ │ │ ├── package-info-service.mustache │ │ │ │ ├── beanValidation.mustache │ │ │ │ └── typeInfoAnnotation.mustache │ │ │ ├── typescript-axios │ │ │ │ ├── gitignore │ │ │ │ ├── modelIndex.mustache │ │ │ │ ├── npmignore │ │ │ │ ├── modelAllOf.mustache │ │ │ │ ├── modelOneOf.mustache │ │ │ │ ├── api.mustache │ │ │ │ ├── index.mustache │ │ │ │ ├── modelEnum.mustache │ │ │ │ ├── licenseInfo.mustache │ │ │ │ └── tsconfig.mustache │ │ │ ├── typescript-angular │ │ │ │ ├── gitignore │ │ │ │ ├── modelAlias.mustache │ │ │ │ ├── npmignore │ │ │ │ ├── models.mustache │ │ │ │ ├── typings.mustache │ │ │ │ ├── ng-package.mustache │ │ │ │ ├── modelGenericAdditionalProperties.mustache │ │ │ │ ├── index.mustache │ │ │ │ ├── variables.mustache │ │ │ │ ├── modelEnum.mustache │ │ │ │ ├── licenseInfo.mustache │ │ │ │ ├── rxjs-operators.mustache │ │ │ │ ├── apis.mustache │ │ │ │ ├── modelGeneric.mustache │ │ │ │ ├── modelGenericEnums.mustache │ │ │ │ └── model.mustache │ │ │ ├── csharp │ │ │ │ ├── visibility.mustache │ │ │ │ ├── FodyWeavers.xml │ │ │ │ ├── travis.mustache │ │ │ │ ├── project.json.mustache │ │ │ │ ├── partial_header.mustache │ │ │ │ ├── interface.mustache │ │ │ │ ├── packages_test.config.mustache │ │ │ │ └── ExceptionFactory.mustache │ │ │ ├── csharp-471 │ │ │ │ ├── visibility.mustache │ │ │ │ ├── FodyWeavers.xml │ │ │ │ ├── travis.mustache │ │ │ │ ├── project.json.mustache │ │ │ │ ├── partial_header.mustache │ │ │ │ ├── interface.mustache │ │ │ │ └── ExceptionFactory.mustache │ │ │ ├── .DS_Store │ │ │ ├── swift3 │ │ │ │ ├── Cartfile.mustache │ │ │ │ ├── _param.mustache │ │ │ │ └── Configuration.mustache │ │ │ ├── php │ │ │ │ ├── .travis.yml │ │ │ │ ├── partial_header.mustache │ │ │ │ └── model_enum.mustache │ │ │ ├── csharp-dotnet2 │ │ │ │ ├── packages.config.mustache │ │ │ │ └── compile-mono.sh.mustache │ │ │ └── htmlDocs │ │ │ │ ├── formParam.mustache │ │ │ │ ├── pathParam.mustache │ │ │ │ ├── headerParam.mustache │ │ │ │ ├── queryParam.mustache │ │ │ │ └── bodyParam.mustache │ │ ├── arguments │ │ │ ├── server.yaml │ │ │ ├── spring.yaml │ │ │ ├── java.yaml │ │ │ ├── aspnetcore.yaml │ │ │ └── inflector.yaml │ │ ├── mustache │ │ │ └── typescript-fetch │ │ │ │ ├── licenseInfo.mustache │ │ │ │ └── tsconfig.mustache │ │ └── logback.xml │ └── java │ │ └── io │ │ └── swagger │ │ └── codegen │ │ └── v3 │ │ └── generators │ │ ├── handlebars │ │ ├── csharp │ │ │ └── CsharpHelper.java │ │ ├── IsHelper.java │ │ ├── HasHelper.java │ │ ├── HasNotHelper.java │ │ └── IsNotHelper.java │ │ └── features │ │ ├── GzipFeatures.java │ │ ├── CXFFeatures.java │ │ ├── SwaggerUIFeatures.java │ │ ├── SwaggerFeatures.java │ │ ├── GzipTestFeatures.java │ │ ├── LoggingTestFeatures.java │ │ ├── OptionalFeatures.java │ │ ├── LoggingFeatures.java │ │ ├── JbossFeature.java │ │ ├── BeanValidationFeatures.java │ │ ├── UseGenericResponseFeatures.java │ │ ├── PerformBeanValidationFeatures.java │ │ ├── BeanValidationExtendedFeatures.java │ │ ├── NotNullAnnotationFeatures.java │ │ └── SpringFeatures.java └── test │ └── java │ └── io │ └── swagger │ └── codegen │ └── v3 │ └── generators │ └── options │ ├── OptionsProvider.java │ └── JavaInflectorServerOptionsProvider.java ├── .whitesource ├── .mvn └── wrapper │ └── maven-wrapper.jar ├── .editorconfig ├── .github ├── dependabot.yml └── workflows │ └── dependency-review.yml ├── bin └── utils │ ├── detect_merge_conflict.sh │ ├── detect_tab_in_java_class.sh │ └── detect_carriage_return.sh └── .gitignore /src/main/resources/handlebars/Java/build.sbt.mustache: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/go/swagger.mustache: -------------------------------------------------------------------------------- 1 | {{{swagger-yaml}}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/pythonFlaskConnexion/__init__.mustache: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/javascript/mocha.opts: -------------------------------------------------------------------------------- 1 | --timeout 10000 2 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/nodejs/swagger.mustache: -------------------------------------------------------------------------------- 1 | {{{swagger-yaml}}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/python/__init__test.mustache: -------------------------------------------------------------------------------- 1 | # coding: utf-8 -------------------------------------------------------------------------------- /src/main/resources/handlebars/swagger-static/assets/css/site.css: -------------------------------------------------------------------------------- 1 | site.css -------------------------------------------------------------------------------- /src/main/resources/handlebars/go-server/swagger.mustache: -------------------------------------------------------------------------------- 1 | {{{swagger-yaml}}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/javascript/es6/mocha.opts: -------------------------------------------------------------------------------- 1 | --timeout 10000 2 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaInflector/openapi3.mustache: -------------------------------------------------------------------------------- 1 | {{{openapi3-yaml}}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaSpring/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=0.12.0 2 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/codegen/services.mustache: -------------------------------------------------------------------------------- 1 | {{fullyQualifiedGeneratorClass}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/ruby/rspec.mustache: -------------------------------------------------------------------------------- 1 | --color 2 | --require spec_helper 3 | -------------------------------------------------------------------------------- /.whitesource: -------------------------------------------------------------------------------- 1 | { 2 | "settingsInheritedFrom": "swagger-api/whitesource-config@main" 3 | } 4 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/cxf/server/application.properties.mustache: -------------------------------------------------------------------------------- 1 | cxf.path=/ -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/spec/returnTypeInterface.mustache: -------------------------------------------------------------------------------- 1 | {{{returnType}}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaMicronaut/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=0.12.0 2 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/R/Rbuildignore.mustache: -------------------------------------------------------------------------------- 1 | ^.*\.Rproj$ 2 | ^\.Rproj\.user$ 3 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/dart/analysis_options.mustache: -------------------------------------------------------------------------------- 1 | analyzer: 2 | strong-mode: true -------------------------------------------------------------------------------- /src/main/resources/handlebars/pythonFlaskConnexion/swagger.mustache: -------------------------------------------------------------------------------- 1 | {{{openapi-yaml}}} 2 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/Java/settings.gradle.mustache: -------------------------------------------------------------------------------- 1 | rootProject.name = "{{artifactId}}" -------------------------------------------------------------------------------- /src/main/resources/handlebars/aspnetcore/wwwroot/swagger-original.mustache: -------------------------------------------------------------------------------- 1 | {{{swagger-json}}} 2 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/kotlin-client/settings.gradle.mustache: -------------------------------------------------------------------------------- 1 | rootProject.name = '{{artifactId}}' -------------------------------------------------------------------------------- /src/main/resources/handlebars/kotlin-server/libraries/ktor/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.caching=true -------------------------------------------------------------------------------- /src/main/resources/handlebars/kotlin-server/settings.gradle.mustache: -------------------------------------------------------------------------------- 1 | rootProject.name = '{{artifactId}}' -------------------------------------------------------------------------------- /src/main/resources/handlebars/scala/client/settings.gradle.mustache: -------------------------------------------------------------------------------- 1 | rootProject.name = "{{artifactId}}" -------------------------------------------------------------------------------- /src/main/resources/handlebars/swift4/modelArray.mustache: -------------------------------------------------------------------------------- 1 | public typealias {{classname}} = {{parent}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/swift5/modelArray.mustache: -------------------------------------------------------------------------------- 1 | public typealias {{classname}} = {{parent}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/typescript-fetch/gitignore: -------------------------------------------------------------------------------- 1 | wwwroot/*.js 2 | node_modules 3 | typings 4 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/libraries/jersey1/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=0.12.0 2 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/resteasy/settingsGradle.mustache: -------------------------------------------------------------------------------- 1 | rootProject.name = "{{artifactId}}" -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaVertXServer/README.mustache: -------------------------------------------------------------------------------- 1 | Project generated on : {{generatedDate}} 2 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/codegen/model.template: -------------------------------------------------------------------------------- 1 | 2 | # This is a sample model mustache template. 3 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/typescript-axios/gitignore: -------------------------------------------------------------------------------- 1 | wwwroot/*.js 2 | node_modules 3 | typings 4 | dist -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/resteasy/eap/settingsGradle.mustache: -------------------------------------------------------------------------------- 1 | rootProject.name = "{{artifactId}}" -------------------------------------------------------------------------------- /src/main/resources/handlebars/typescript-angular/gitignore: -------------------------------------------------------------------------------- 1 | wwwroot/*.js 2 | node_modules 3 | typings 4 | dist 5 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/typescript-angular/modelAlias.mustache: -------------------------------------------------------------------------------- 1 | export type {{classname}} = {{dataType}}; -------------------------------------------------------------------------------- /src/main/resources/handlebars/Java/gradle.properties.mustache: -------------------------------------------------------------------------------- 1 | # Uncomment to build for Android 2 | #target = android -------------------------------------------------------------------------------- /src/main/resources/handlebars/aspnetcore/wwwroot/index.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/codegen/myFile.template: -------------------------------------------------------------------------------- 1 | 2 | # This is a sample supporting file mustache template. 3 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaInflector/bodyParams.mustache: -------------------------------------------------------------------------------- 1 | {{#is this 'body-param'}}{{{dataType}}} {{paramName}}{{/is}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaInflector/pathParams.mustache: -------------------------------------------------------------------------------- 1 | {{#is this 'path-param'}}{{{dataType}}} {{paramName}}{{/is}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/scala/client/gradle.properties.mustache: -------------------------------------------------------------------------------- 1 | # Uncomment to build for Android 2 | #target = android -------------------------------------------------------------------------------- /src/main/resources/handlebars/typescript-angular/npmignore: -------------------------------------------------------------------------------- 1 | wwwroot/*.js 2 | node 3 | node_modules 4 | typings 5 | dist 6 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/Java/beanValidationQueryParams.mustache: -------------------------------------------------------------------------------- 1 | {{#required}} @NotNull{{/required}}{{>beanValidationCore}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaInflector/headerParams.mustache: -------------------------------------------------------------------------------- 1 | {{#is this 'header-param'}}{{{dataType}}} {{paramName}}{{/is}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaInflector/queryParams.mustache: -------------------------------------------------------------------------------- 1 | {{#is this 'query-param'}}{{{dataType}}} {{paramName}}{{/is}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/cxf/bodyParamsImpl.mustache: -------------------------------------------------------------------------------- 1 | {{#is this 'body-param'}}{{{dataType}}} {{paramName}}{{/is}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/cxf/pathParamsImpl.mustache: -------------------------------------------------------------------------------- 1 | {{#is this 'path-param'}}{{{dataType}}} {{paramName}}{{/is}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/serviceBodyParams.mustache: -------------------------------------------------------------------------------- 1 | {{#is this 'body-param'}}{{{dataType}}} {{paramName}}{{/is}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/aspnetcore/bodyParam.mustache: -------------------------------------------------------------------------------- 1 | {{#isBodyParam}}[FromBody]{{&dataType}} {{paramName}}{{/isBodyParam}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/typescript-fetch/custom.d.mustache: -------------------------------------------------------------------------------- 1 | declare module 'isomorphic-fetch'; 2 | declare module 'url'; -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/beanValidationQueryParams.mustache: -------------------------------------------------------------------------------- 1 | {{#required}} @NotNull{{/required}}{{>beanValidationCore}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/cxf/cookieParamsImpl.mustache: -------------------------------------------------------------------------------- 1 | {{#isCookieParam}}{{{dataType}}} {{paramName}}{{/isCookieParam}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/cxf/headerParamsImpl.mustache: -------------------------------------------------------------------------------- 1 | {{#is this 'header-param'}}{{{dataType}}} {{paramName}}{{/is}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/cxf/queryParamsImpl.mustache: -------------------------------------------------------------------------------- 1 | {{#is this 'query-param'}}{{{dataType}}} {{paramName}}{{/is}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/serviceCookieParams.mustache: -------------------------------------------------------------------------------- 1 | {{#isCookieParam}}{{{dataType}}} {{paramName}}{{/isCookieParam}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/serviceHeaderParams.mustache: -------------------------------------------------------------------------------- 1 | {{#is this 'header-param'}}{{{dataType}}} {{paramName}}{{/is}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaSpring/beanValidationQueryParams.mustache: -------------------------------------------------------------------------------- 1 | {{#required}}@NotNull {{/required}}{{>beanValidationCore}} -------------------------------------------------------------------------------- /.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/swagger-api/swagger-codegen-generators/HEAD/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /src/main/resources/handlebars/Java/libraries/retrofit/cookieParams.mustache: -------------------------------------------------------------------------------- 1 | {{~#is this 'cookie-param'}}{{{dataType}}} {{paramName}}{{/is}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/cxf-cdi/serviceBodyParams.mustache: -------------------------------------------------------------------------------- 1 | {{#is this 'body-param'}}{{{dataType}}} {{paramName}}{{/is}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/cxf-cdi/serviceHeaderParams.mustache: -------------------------------------------------------------------------------- 1 | {{#is this 'header-param'}}{{{dataType}}} {{paramName}}{{/is}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/cxf-cdi/servicePathParams.mustache: -------------------------------------------------------------------------------- 1 | {{#is this 'path-param'}}{{{dataType}}} {{paramName}}{{/is}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/cxf-cdi/serviceQueryParams.mustache: -------------------------------------------------------------------------------- 1 | {{#is this 'query-param'}}{{{dataType}}} {{paramName}}{{/is}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/cxf/beanValidationQueryParams.mustache: -------------------------------------------------------------------------------- 1 | {{#required}} @NotNull{{/required}}{{>beanValidationCore}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/resteasy/serviceBodyParams.mustache: -------------------------------------------------------------------------------- 1 | {{#is this 'body-param'}}{{{dataType}}} {{paramName}}{{/is}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/resteasy/servicePathParams.mustache: -------------------------------------------------------------------------------- 1 | {{#is this 'path-param'}}{{{dataType}}} {{paramName}}{{/is}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/resteasy/serviceQueryParams.mustache: -------------------------------------------------------------------------------- 1 | {{#is this 'query-param'}}{{{dataType}}} {{paramName}}{{/is}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/spec/beanValidationQueryParams.mustache: -------------------------------------------------------------------------------- 1 | {{#required}} @NotNull{{/required}}{{>beanValidationCore}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaMicronaut/publisher.mustache: -------------------------------------------------------------------------------- 1 | {{#useReactor}}Publisher{{/useReactor}}{{^useReactor}}Single{{/useReactor}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/csharp/visibility.mustache: -------------------------------------------------------------------------------- 1 | {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/Java/libraries/retrofit2/cookieParams.mustache: -------------------------------------------------------------------------------- 1 | {{~#is this 'cookie-param'}}{{{dataType}}} {{paramName}}{{/is}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/cxf-cdi/beanValidationQueryParams.mustache: -------------------------------------------------------------------------------- 1 | {{#required}} @NotNull{{/required}}{{>beanValidationCore}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/resteasy/beanValidationQueryParams.mustache: -------------------------------------------------------------------------------- 1 | {{#required}} @NotNull{{/required}}{{>beanValidationCore}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/resteasy/eap/serviceBodyParams.mustache: -------------------------------------------------------------------------------- 1 | {{#is this 'body-param'}}{{{dataType}}} {{paramName}}{{/is}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/resteasy/eap/serviceHeaderParams.mustache: -------------------------------------------------------------------------------- 1 | {{#is this 'header-param'}}{{{dataType}}} {{paramName}}{{/is}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/resteasy/eap/servicePathParams.mustache: -------------------------------------------------------------------------------- 1 | {{#is this 'path-param'}}{{{dataType}}} {{paramName}}{{/is}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/resteasy/eap/serviceQueryParams.mustache: -------------------------------------------------------------------------------- 1 | {{#is this 'query-param'}}{{{dataType}}} {{paramName}}{{/is}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/resteasy/serviceCookieParams.mustache: -------------------------------------------------------------------------------- 1 | {{#isCookieParam}}{{{dataType}}} {{paramName}}{{/isCookieParam}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/resteasy/serviceHeaderParams.mustache: -------------------------------------------------------------------------------- 1 | {{#is this 'header-param'}}{{{dataType}}} {{paramName}}{{/is}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/csharp-471/visibility.mustache: -------------------------------------------------------------------------------- 1 | {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/resteasy/eap/serviceCookieParams.mustache: -------------------------------------------------------------------------------- 1 | {{#isCookieParam}}{{{dataType}}} {{paramName}}{{/isCookieParam}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/resteasy/jboss-web.mustache: -------------------------------------------------------------------------------- 1 | 2 | {{contextPath}} 3 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/go/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | install: 4 | - go get -d -v . 5 | 6 | script: 7 | - go build -v ./ 8 | 9 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/javascript/es6/travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "6" 4 | - "6.1" 5 | - "5" 6 | - "5.11" 7 | 8 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/javascript/travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "6" 4 | - "6.1" 5 | - "5" 6 | - "5.11" 7 | 8 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/swagger-api/swagger-codegen-generators/HEAD/src/main/resources/handlebars/.DS_Store -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaInflector/README.mustache: -------------------------------------------------------------------------------- 1 | # Swagger Inflector 2 | 3 | Run with 4 | 5 | ``` 6 | mvn package jetty:run 7 | `` 8 | 9 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/resteasy/eap/jboss-web.mustache: -------------------------------------------------------------------------------- 1 | 2 | {{contextPath}} 3 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/typescript-axios/modelIndex.mustache: -------------------------------------------------------------------------------- 1 | {{#models}}{{#model}}export * from './{{classFilename}}';{{/model}} 2 | {{/models}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/typescript-axios/npmignore: -------------------------------------------------------------------------------- 1 | # empty npmignore to ensure all required files (e.g., in the dist folder) are published by npm -------------------------------------------------------------------------------- /src/main/resources/handlebars/Java/libraries/retrofit/bodyParams.mustache: -------------------------------------------------------------------------------- 1 | {{~#is this 'body-param'}}@retrofit.http.Body {{{dataType}}} {{paramName}}{{/is}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/Java/libraries/retrofit2/bodyParams.mustache: -------------------------------------------------------------------------------- 1 | {{#is this 'body-param'}}@retrofit2.http.Body {{{dataType}}} {{paramName}}{{/is}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/beanValidationPathParams.mustache: -------------------------------------------------------------------------------- 1 | {{! PathParam is always required, no @NotNull necessary }}{{>beanValidationCore}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/cxf/beanValidationPathParams.mustache: -------------------------------------------------------------------------------- 1 | {{! PathParam is always required, no @NotNull necessary }}{{>beanValidationCore}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/cxf/cookieParams.mustache: -------------------------------------------------------------------------------- 1 | {{#isCookieParam}}@CookieParam("{{baseName}}") {{{dataType}}} {{paramName}}{{/isCookieParam}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/cxf/headerParams.mustache: -------------------------------------------------------------------------------- 1 | {{#is this 'header-param'}}@HeaderParam("{{baseName}}") {{{dataType}}} {{paramName}}{{/is}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/resteasy/comma.mustache: -------------------------------------------------------------------------------- 1 | {{^isFormParam}},{{/isFormParam}}{{#isFormParam}}{{^isBinary}},{{/isBinary}}{{/isFormParam}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaSpring/beanValidationPathParams.mustache: -------------------------------------------------------------------------------- 1 | {{! PathParam is always required, no @NotNull necessary }}{{>beanValidationCore}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/cxf-cdi/beanValidationPathParams.mustache: -------------------------------------------------------------------------------- 1 | {{! PathParam is always required, no @NotNull necessary }}{{>beanValidationCore}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/resteasy/beanValidationPathParams.mustache: -------------------------------------------------------------------------------- 1 | {{! PathParam is always required, no @NotNull necessary }}{{>beanValidationCore}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/resteasy/eap/comma.mustache: -------------------------------------------------------------------------------- 1 | {{^isFormParam}},{{/isFormParam}}{{#isFormParam}}{{^isBinary}},{{/isBinary}}{{/isFormParam}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/resteasy/serviceFormParams.mustache: -------------------------------------------------------------------------------- 1 | {{#isFormParam}}{{^isBinary}}{{{dataType}}} {{paramName}}{{/isBinary}}{{/isFormParam}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/spec/beanValidationPathParams.mustache: -------------------------------------------------------------------------------- 1 | {{! PathParam is always required, no @NotNull necessary }}{{>beanValidationCore}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/ruby/version.mustache: -------------------------------------------------------------------------------- 1 | =begin 2 | {{> api_info}} 3 | =end 4 | 5 | module {{moduleName}} 6 | VERSION = '{{gemVersion}}' 7 | end 8 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/resteasy/eap/serviceFormParams.mustache: -------------------------------------------------------------------------------- 1 | {{#isFormParam}}{{^isBinary}}{{{dataType}}} {{paramName}}{{/isBinary}}{{/isFormParam}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/Java/libraries/retrofit/pathParams.mustache: -------------------------------------------------------------------------------- 1 | {{~#is this 'path-param'}}@retrofit.http.Path("{{baseName}}") {{{dataType}}} {{paramName}}{{/is}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/Java/libraries/retrofit/queryParams.mustache: -------------------------------------------------------------------------------- 1 | {{~#is this 'query-param'}}@retrofit.http.Query("{{baseName}}") {{{dataType}}} {{paramName}}{{/is}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/Java/libraries/retrofit2/pathParams.mustache: -------------------------------------------------------------------------------- 1 | {{#is this 'path-param'}}@retrofit2.http.Path("{{baseName}}") {{{dataType}}} {{paramName}}{{/is}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaMicronaut/beanValidationParams.mustache: -------------------------------------------------------------------------------- 1 | {{#useBeanValidation}}{{>beanValidationParamsInner}}{{>beanValidationCore}}{{/useBeanValidation}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/typescript-angular/models.mustache: -------------------------------------------------------------------------------- 1 | {{#models}} 2 | {{#model}} 3 | export * from './{{{ classFilename }}}'; 4 | {{/model}} 5 | {{/models}} 6 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/typescript-fetch/index.mustache: -------------------------------------------------------------------------------- 1 | // tslint:disable 2 | {{>licenseInfo}} 3 | 4 | export * from "./api"; 5 | export * from "./configuration"; 6 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/Java/libraries/retrofit/headerParams.mustache: -------------------------------------------------------------------------------- 1 | {{~#is this 'header-param'}}@retrofit.http.Header("{{baseName}}") {{{dataType}}} {{paramName}}{{/is}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/Java/libraries/retrofit2/headerParams.mustache: -------------------------------------------------------------------------------- 1 | {{#is this 'header-param'}}@retrofit2.http.Header("{{baseName}}") {{{dataType}}} {{paramName}}{{/is}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/Java/libraries/retrofit2/queryParams.mustache: -------------------------------------------------------------------------------- 1 | {{#is this 'query-param'}}@retrofit2.http.Query("{{baseName}}") {{{dataType}}} {{paramName}}{{/is}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/cxf/bodyParams.mustache: -------------------------------------------------------------------------------- 1 | {{#is this 'body-param'}}{{#useBeanValidation}}@Valid {{/useBeanValidation}}{{{dataType}}} {{paramName}}{{/is}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/spec/bodyParams.mustache: -------------------------------------------------------------------------------- 1 | {{#is this 'body-param'}}{{#useBeanValidation}}@Valid {{/useBeanValidation}}{{{dataType}}} {{paramName}}{{/is}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/aspnetcore/tags.mustache: -------------------------------------------------------------------------------- 1 | {{!TODO: Need iterable tags object...}}{{#tags}}, Tags = new[] { {{/tags}}"{{#tags}}{{tag}} {{/tags}}"{{#tags}} }{{/tags}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/python/requirements.mustache: -------------------------------------------------------------------------------- 1 | certifi >= 14.05.14 2 | six >= 1.10 3 | python_dateutil >= 2.5.3 4 | setuptools >= 21.0.0 5 | urllib3 >= 1.15.1 6 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/typescript-angular/typings.mustache: -------------------------------------------------------------------------------- 1 | { 2 | "globalDependencies": { 3 | "core-js": "registry:dt/core-js#0.0.0+20160725163759" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/Java/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/swagger-api/swagger-codegen-generators/HEAD/src/main/resources/handlebars/Java/gradle-wrapper.jar -------------------------------------------------------------------------------- /src/main/resources/handlebars/Java/manifest.mustache: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/Java/model_doc.mustache: -------------------------------------------------------------------------------- 1 | {{#models}}{{#model}} 2 | {{#is this 'enum'}}{{>enum_outer_doc}}{{/is}}{{#isNot this 'enum'}}{{>pojo_doc}}{{/isNot}} 3 | {{/model}}{{/models}} 4 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/servicePathParams.mustache: -------------------------------------------------------------------------------- 1 | {{#is this 'path-param'}}{{#useBeanValidation}}{{>beanValidationPathParams}}{{/useBeanValidation}}{{{dataType}}} {{paramName}}{{/is}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/serviceQueryParams.mustache: -------------------------------------------------------------------------------- 1 | {{#is this 'query-param'}}{{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}{{{dataType}}} {{paramName}}{{/is}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/csharp-471/FodyWeavers.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/csharp/FodyWeavers.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/Java/libraries/resttemplate/auth/OAuthFlow.mustache: -------------------------------------------------------------------------------- 1 | package {{invokerPackage}}.auth; 2 | 3 | public enum OAuthFlow { 4 | accessCode, implicit, password, application 5 | } -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaMicronaut/bodyParams.mustache: -------------------------------------------------------------------------------- 1 | {{#isBodyParam}}{{>nullableBeanValidationParams}}@Parameter(description = "{{{description}}}") @Body {{{dataType}}} {{paramName}}{{/isBodyParam}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/kotlin-client/model_doc.mustache: -------------------------------------------------------------------------------- 1 | {{#models}}{{#model}} 2 | {{#is this 'enum'}}{{>enum_doc}}{{/is}}{{#isNot this 'enum'}}{{>class_doc}}{{/isNot}} 3 | {{/model}}{{/models}} 4 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/kotlin-server/model_doc.mustache: -------------------------------------------------------------------------------- 1 | {{#models}}{{#model}} 2 | {{#is this 'enum'}}{{>enum_doc}}{{/is}}{{#isNot this 'enum'}}{{>class_doc}}{{/isNot}} 3 | {{/model}}{{/models}} 4 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/pythonFlaskConnexion/test-requirements.mustache: -------------------------------------------------------------------------------- 1 | flask_testing==0.8.0 2 | coverage>=4.0.3 3 | nose>=1.3.7 4 | pluggy>=0.3.1 5 | py>=1.4.31 6 | randomize>=0.13 7 | tox==3.20.1 8 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/swagger-static/assets/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/swagger-api/swagger-codegen-generators/HEAD/src/main/resources/handlebars/swagger-static/assets/images/logo.png -------------------------------------------------------------------------------- /src/main/resources/handlebars/typescript-angular/ng-package.mustache: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "./node_modules/ng-packagr/ng-package.schema.json", 3 | "lib": { 4 | "entryFile": "index.ts" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /src/main/resources/arguments/server.yaml: -------------------------------------------------------------------------------- 1 | arguments: 2 | - option: "--use-oas2" 3 | description: "use OpenAPI v2.0 (Swagger 1.5.x) annotations (by default, OpenAPI v3.0 is used)." 4 | type: "boolean" 5 | -------------------------------------------------------------------------------- /src/main/resources/arguments/spring.yaml: -------------------------------------------------------------------------------- 1 | arguments: 2 | - option: "--use-oas2" 3 | description: "use OpenAPI v2.0 (Swagger 1.5.x) annotations (by default, OpenAPI v3.0 is used)." 4 | type: "boolean" 5 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/Java/auth/OAuthFlow.mustache: -------------------------------------------------------------------------------- 1 | {{>licenseInfo}} 2 | 3 | package {{invokerPackage}}.auth; 4 | 5 | public enum OAuthFlow { 6 | accessCode, implicit, password, application 7 | } 8 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/dart/model.mustache: -------------------------------------------------------------------------------- 1 | part of {{pubName}}.api; 2 | 3 | {{#models}} 4 | {{#model}} 5 | {{#isEnum}}{{>enum}}{{/isEnum}}{{^isEnum}}{{>class}}{{/isEnum}} 6 | {{/model}} 7 | {{/models}} 8 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/Java/enum_outer_doc.mustache: -------------------------------------------------------------------------------- 1 | # {{classname}} 2 | 3 | ## Enum 4 | 5 | {{#allowableValues}}{{#enumVars}} 6 | * `{{name}}` (value: `{{{value}}}`) 7 | {{/enumVars}}{{/allowableValues}} 8 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/cxf/formParamsImpl.mustache: -------------------------------------------------------------------------------- 1 | {{#is this 'form-param'}}{{#isNot this 'binary'}}{{{dataType}}} {{paramName}}{{/isNot}}{{#is this 'binary'}} Attachment {{paramName}}Detail{{/is}}{{/is}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/cxf/pathParams.mustache: -------------------------------------------------------------------------------- 1 | {{#is this 'path-param'}}@PathParam("{{baseName}}"){{#useBeanValidation}}{{>beanValidationPathParams}}{{/useBeanValidation}} {{{dataType}}} {{paramName}}{{/is}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaMicronaut/nullableBeanValidationParams.mustache: -------------------------------------------------------------------------------- 1 | {{#useBeanValidation}}{{#required}}@NotNull {{/required}}{{^required}}@Nullable {{/required}}{{>beanValidationParams}}{{/useBeanValidation}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/kotlin-client/enum_doc.mustache: -------------------------------------------------------------------------------- 1 | # {{classname}} 2 | 3 | ## Enum 4 | 5 | {{#allowableValues}}{{#enumVars}} 6 | * `{{name}}` (value: `{{{value}}}`) 7 | {{/enumVars}}{{/allowableValues}} 8 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/kotlin-server/enum_doc.mustache: -------------------------------------------------------------------------------- 1 | # {{classname}} 2 | 3 | ## Enum 4 | 5 | {{#allowableValues}}{{#enumVars}} 6 | * `{{name}}` (value: `{{{value}}}`) 7 | {{/enumVars}}{{/allowableValues}} 8 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/swift4/modelEnum.mustache: -------------------------------------------------------------------------------- 1 | public enum {{classname}}: {{dataType}}, Codable { 2 | {{#allowableValues}}{{#enumVars}} case {{name}} = "{{{value}}}" 3 | {{/enumVars}}{{/allowableValues}} 4 | } -------------------------------------------------------------------------------- /src/main/resources/handlebars/swift5/modelEnum.mustache: -------------------------------------------------------------------------------- 1 | public enum {{classname}}: {{dataType}}, Codable { 2 | {{#allowableValues}}{{#enumVars}} case {{name}} = "{{{value}}}" 3 | {{/enumVars}}{{/allowableValues}} 4 | } -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaInflector/formParams.mustache: -------------------------------------------------------------------------------- 1 | {{#is this 'form-param'}}{{#isNot this 'binary'}}{{{dataType}}} {{paramName}}{{/isNot}}{{#is this 'binary'}}FormDataContentDisposition fileDetail{{/is}}{{/is}} 2 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaVertXServer/package-info-model.mustache: -------------------------------------------------------------------------------- 1 | @ModuleGen(name = "model", groupPackage = "{{modelPackage}}") 2 | package {{modelPackage}}; 3 | 4 | import io.vertx.codegen.annotations.ModuleGen; 5 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/dart/pubspec.mustache: -------------------------------------------------------------------------------- 1 | name: {{pubName}} 2 | version: {{pubVersion}} 3 | description: {{pubDescription}} 4 | dependencies: 5 | http: '>=0.11.1 <0.13.0' 6 | dev_dependencies: 7 | test: ^1.3.0 8 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/ruby/Rakefile.mustache: -------------------------------------------------------------------------------- 1 | begin 2 | require 'rspec/core/rake_task' 3 | 4 | RSpec::Core::RakeTask.new(:spec) 5 | task default: :spec 6 | rescue LoadError 7 | # no rspec available 8 | end 9 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/cxf/returnTypes.mustache: -------------------------------------------------------------------------------- 1 | {{#useGenericResponse}}Response{{/useGenericResponse}}{{! non-generic response: 2 | }}{{^useGenericResponse}}{{! 3 | }}{{{returnType}}}{{! 4 | }}{{/useGenericResponse}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/resteasy/eap/pathParams.mustache: -------------------------------------------------------------------------------- 1 | {{#is this 'path-param'}}{{#useBeanValidation}}{{>beanValidationPathParams}}{{/useBeanValidation}} @PathParam("{{baseName}}") {{{dataType}}} {{paramName}}{{/is}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/resteasy/pathParams.mustache: -------------------------------------------------------------------------------- 1 | {{#is this 'path-param'}}{{#useBeanValidation}}{{>beanValidationPathParams}}{{/useBeanValidation}} @PathParam("{{baseName}}") {{{dataType}}} {{paramName}}{{/is}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaSpring/application.properties.mustache: -------------------------------------------------------------------------------- 1 | {{#useOas2}} 2 | springfox.documentation.swagger.v2.path=/api-docs 3 | {{/useOas2}} 4 | {{^useOas2}} 5 | springdoc.api-docs.path=/api-docs 6 | {{/useOas2}} 7 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/typescript-angular/modelGenericAdditionalProperties.mustache: -------------------------------------------------------------------------------- 1 | {{#if additionalPropertiesType}} 2 | 3 | [key: string]: {{{additionalPropertiesType}}}{{#has this 'vars'}} | any{{/has}}; 4 | 5 | {{/if}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/resteasy/eap/queryParams.mustache: -------------------------------------------------------------------------------- 1 | {{#is this 'query-param'}}{{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}} @QueryParam("{{baseName}}") {{{dataType}}} {{paramName}}{{/is}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaMicronaut/optionalDataType.mustache: -------------------------------------------------------------------------------- 1 | {{#useOptional}}{{#required}}{{{dataType}}}{{/required}}{{^required}}Optional<{{{dataType}}}>{{/required}}{{/useOptional}}{{^useOptional}}{{{dataType}}}{{/useOptional}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaSpring/optionalDataType.mustache: -------------------------------------------------------------------------------- 1 | {{#useOptional}}{{#required}}{{{dataType}}}{{/required}}{{^required}}Optional<{{{dataType}}}>{{/required}}{{/useOptional}}{{^useOptional}}{{{dataType}}}{{/useOptional}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/javascript/.babelrc.mustache: -------------------------------------------------------------------------------- 1 | { 2 | "plugins": [ 3 | ["babel-plugin-transform-builtin-extend", { 4 | "globals": ["Error", "Array"] 5 | }] 6 | ], 7 | "presets": ["env", "stage-0"] 8 | } 9 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/swift3/Cartfile.mustache: -------------------------------------------------------------------------------- 1 | github "Alamofire/Alamofire" ~> 4.5{{#usePromiseKit}} 2 | github "mxcl/PromiseKit" ~> 4.4{{/usePromiseKit}}{{#useRxSwift}} 3 | github "ReactiveX/RxSwift" "rxswift-3.0"{{/useRxSwift}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/swift4/Cartfile.mustache: -------------------------------------------------------------------------------- 1 | github "Alamofire/Alamofire" ~> 4.5.0{{#usePromiseKit}} 2 | github "mxcl/PromiseKit" ~> 4.4{{/usePromiseKit}}{{#useRxSwift}} 3 | github "ReactiveX/RxSwift" ~> 4.0{{/useRxSwift}} 4 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/swift5/Cartfile.mustache: -------------------------------------------------------------------------------- 1 | github "Alamofire/Alamofire" ~> 4.9.0{{#usePromiseKit}} 2 | github "mxcl/PromiseKit" ~> 4.4{{/usePromiseKit}}{{#useRxSwift}} 3 | github "ReactiveX/RxSwift" ~> 4.0{{/useRxSwift}} 4 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/php/.travis.yml: -------------------------------------------------------------------------------- 1 | language: php 2 | sudo: false 3 | php: 4 | - 5.4 5 | - 5.5 6 | - 5.6 7 | - 7.0 8 | - hhvm 9 | before_install: "composer install" 10 | script: "vendor/bin/phpunit" 11 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # http://editorconfig.org/ 2 | # top-most EditorConfig file 3 | root = true 4 | 5 | [*.java] 6 | end_of_line = lf 7 | charset = utf-8 8 | indent_style = space 9 | indent_size = 4 10 | trim_trailing_whitespace = true 11 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaMicronaut/headerParams.mustache: -------------------------------------------------------------------------------- 1 | {{#isHeaderParam}}{{>nullableBeanValidationParams}}@Parameter(description = "{{{description}}}") @Header(value = "{{baseName}}") {{>optionalDataType}} {{paramName}}{{/isHeaderParam}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/kotlin-client/data_class_req_var.mustache: -------------------------------------------------------------------------------- 1 | {{#description}} 2 | /* {{{description}}} */ 3 | {{/description}} 4 | val {{{name}}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{datatype}}}{{/isEnum}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/kotlin-server/data_class_req_var.mustache: -------------------------------------------------------------------------------- 1 | {{#description}} 2 | /* {{{description}}} */ 3 | {{/description}} 4 | val {{{name}}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{datatype}}}{{/isEnum}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/ruby/Gemfile.mustache: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | gemspec 4 | 5 | group :development, :test do 6 | gem 'rake', '~> 13.0.1' 7 | gem 'pry-byebug' 8 | gem 'rubocop', '~> 0.66.0' 9 | end 10 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaMicronaut/cookieParams.mustache: -------------------------------------------------------------------------------- 1 | {{#isCookieParam}}{{>nullableBeanValidationParams}}@Parameter(description = "{{{description}}}") @CookieValue(value="{{baseName}}") {{>optionalDataType}} {{paramName}}{{/isCookieParam}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaMicronaut/exampleReturnTypes.mustache: -------------------------------------------------------------------------------- 1 | {{#returnContainer}}{{#isMapContainer}}Map{{/isMapContainer}}{{#isListContainer}}List{{/isListContainer}}{{/returnContainer}}{{^returnContainer}}{{{returnType}}}{{/returnContainer}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaSpring/exampleReturnTypes.mustache: -------------------------------------------------------------------------------- 1 | {{#returnContainer}}{{#isMapContainer}}Map{{/isMapContainer}}{{#isListContainer}}List{{/isListContainer}}{{/returnContainer}}{{^returnContainer}}{{{returnType}}}{{/returnContainer}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/R/NAMESPACE.mustache: -------------------------------------------------------------------------------- 1 | # Generated by swagger-codegen: https://github.com/swagger-api/swagger-codegen 2 | # Do not edit by hand 3 | 4 | {{#models}} 5 | {{#model}} 6 | export({{{classname}}}) 7 | {{/model}} 8 | {{/models}} 9 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/python/__init__api.mustache: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | 3 | # flake8: noqa 4 | 5 | # import apis into api package 6 | {{#apiInfo}}{{#apis}}from {{importPath}} import {{classname}} 7 | {{/apis}}{{/apiInfo}} 8 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/resteasy/eap/enumOuterClass.mustache: -------------------------------------------------------------------------------- 1 | public enum {{classname}} { 2 | {{#allowableValues}} 3 | {{#enumVars}} 4 | {{{name}}}{{^@last}},{{/@last}}{{#@last}};{{/@last}} 5 | {{/enumVars}} 6 | {{/allowableValues}} 7 | } -------------------------------------------------------------------------------- /src/main/resources/handlebars/swagger-static/main.mustache: -------------------------------------------------------------------------------- 1 | var express = require("express") 2 | 3 | var app = express(); 4 | var docs_handler = express.static(__dirname + '/docs/'); 5 | app.use(docs_handler); 6 | // start the server 7 | app.listen(8002); 8 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/Java/generatedAnnotation.mustache: -------------------------------------------------------------------------------- 1 | {{^hideGenerationTimestamp}}@{{#jakarta}}jakarta{{/jakarta}}{{^jakarta}}javax{{/jakarta}}.annotation.Generated(value = "{{generatorClass}}", date = "{{generatedDate}}"){{/hideGenerationTimestamp}} 2 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/cxf-cdi/serviceFormParams.mustache: -------------------------------------------------------------------------------- 1 | {{#is this 'form-param'}}{{#isNot this 'binary'}}{{{dataType}}} {{paramName}}{{/isNot}}{{#is this 'binary'}}InputStream {{paramName}}InputStream, Attachment {{paramName}}Detail{{/is}}{{/is}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaSpring/libraries/spring-boot3/application.mustache: -------------------------------------------------------------------------------- 1 | springdoc.api-docs.path=/api-docs 2 | server.servlet.contextPath={{^contextPath}}/{{/contextPath}}{{#contextPath}}{{contextPath}}{{/contextPath}} 3 | server.port={{serverPort}} 4 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/typescript-axios/modelAllOf.mustache: -------------------------------------------------------------------------------- 1 | /** 2 | * @type {{classname}}{{#description}} 3 | * {{{description}}}{{/description}} 4 | * @export 5 | */ 6 | export type {{classname}} = {{#allOf}}{{{.}}}{{^@last}} & {{/@last}}{{/allOf}}; 7 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/typescript-axios/modelOneOf.mustache: -------------------------------------------------------------------------------- 1 | /** 2 | * @type {{classname}}{{#description}} 3 | * {{{description}}}{{/description}} 4 | * @export 5 | */ 6 | export type {{classname}} = {{#oneOf}}{{{.}}}{{^@last}} | {{/@last}}{{/oneOf}}; 7 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: "maven" 4 | directory: "/" 5 | schedule: 6 | interval: "daily" 7 | ignore: 8 | - dependency-name: "*" 9 | update-types: ["version-update:semver-major"] 10 | -------------------------------------------------------------------------------- /src/main/java/io/swagger/codegen/v3/generators/handlebars/csharp/CsharpHelper.java: -------------------------------------------------------------------------------- 1 | package io.swagger.codegen.v3.generators.handlebars.csharp; 2 | 3 | public class CsharpHelper { 4 | 5 | public CharSequence backslash() { 6 | return "\\"; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaInflector/generatedAnnotation.mustache: -------------------------------------------------------------------------------- 1 | {{^hideGenerationTimestamp}}@{{#jakarta}}jakarta{{/jakarta}}{{^jakarta}}javax{{/jakarta}}.annotation.Generated(value = "{{generatorClass}}", date = "{{generatedDate}}"){{/hideGenerationTimestamp}} 2 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/cxf/generatedAnnotation.mustache: -------------------------------------------------------------------------------- 1 | {{^hideGenerationTimestamp}}@{{#jakarta}}jakarta{{/jakarta}}{{^jakarta}}javax{{/jakarta}}.annotation.Generated(value = "{{generatorClass}}", date = "{{generatedDate}}"){{/hideGenerationTimestamp}} 2 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/generatedAnnotation.mustache: -------------------------------------------------------------------------------- 1 | {{^hideGenerationTimestamp}}@{{#jakarta}}jakarta{{/jakarta}}{{^jakarta}}javax{{/jakarta}}.annotation.Generated(value = "{{generatorClass}}", date = "{{generatedDate}}"){{/hideGenerationTimestamp}} 2 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/serviceFormParams.mustache: -------------------------------------------------------------------------------- 1 | {{#isFormParam}}{{^isBinary}}{{{dataType}}} {{paramName}}{{/isBinary}}{{#isBinary}}java.io.InputStream {{paramName}}InputStream, FormDataContentDisposition {{paramName}}Detail{{/isBinary}}{{/isFormParam}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaMicronaut/generatedAnnotation.mustache: -------------------------------------------------------------------------------- 1 | {{^hideGenerationTimestamp}}@{{#jakarta}}jakarta{{/jakarta}}{{^jakarta}}javax{{/jakarta}}.annotation.Generated(value = "{{generatorClass}}", date = "{{generatedDate}}"){{/hideGenerationTimestamp}} 2 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaSpring/generatedAnnotation.mustache: -------------------------------------------------------------------------------- 1 | {{^hideGenerationTimestamp}}@{{#jakarta}}jakarta{{/jakarta}}{{^jakarta}}javax{{/jakarta}}.annotation.Generated(value = "{{generatorClass}}", date = "{{generatedDate}}"){{/hideGenerationTimestamp}} 2 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/kotlin-client/infrastructure/RequestMethod.kt.mustache: -------------------------------------------------------------------------------- 1 | package {{packageName}}.infrastructure 2 | 3 | /** 4 | * Provides enumerated HTTP verbs 5 | */ 6 | enum class RequestMethod { 7 | GET, DELETE, HEAD, OPTIONS, PATCH, POST, PUT 8 | } -------------------------------------------------------------------------------- /src/main/resources/handlebars/python/test-requirements.mustache: -------------------------------------------------------------------------------- 1 | {{^asyncio}} 2 | coverage>=4.0.3 3 | nose>=1.3.7 4 | {{/asyncio}} 5 | {{#asyncio}} 6 | pytest>=3.3.1 7 | pytest-cov>=2.5.1 8 | {{/asyncio}} 9 | pluggy>=0.3.1 10 | py>=1.4.31 11 | randomize>=0.13 12 | -------------------------------------------------------------------------------- /bin/utils/detect_merge_conflict.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # grep for '<<<<<<< HEAD' 4 | grep -RUIl '<<<<<<< HEAD' src 5 | 6 | if [ $? -ne 1 ]; then 7 | echo "src contain merge conflicts '<<<<<<< HEAD'. Please remove it and try again." 8 | exit 1; 9 | fi 10 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/cxf-cdi/generatedAnnotation.mustache: -------------------------------------------------------------------------------- 1 | {{^hideGenerationTimestamp}}@{{#jakarta}}jakarta{{/jakarta}}{{^jakarta}}javax{{/jakarta}}.annotation.Generated(value = "{{generatorClass}}", date = "{{generatedDate}}"){{/hideGenerationTimestamp}} 2 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/resteasy/generatedAnnotation.mustache: -------------------------------------------------------------------------------- 1 | {{^hideGenerationTimestamp}}@{{#jakarta}}jakarta{{/jakarta}}{{^jakarta}}javax{{/jakarta}}.annotation.Generated(value = "{{generatorClass}}", date = "{{generatedDate}}"){{/hideGenerationTimestamp}} 2 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/returnTypes.mustache: -------------------------------------------------------------------------------- 1 | {{#returnContainer}}{{#is this 'map-container'}}Map{{/is}}{{#is this 'list-container'}}List<{{{returnType}}}>{{/is}}{{/returnContainer}}{{^returnContainer}}{{{returnType}}}{{/returnContainer}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/spec/generatedAnnotation.mustache: -------------------------------------------------------------------------------- 1 | {{^hideGenerationTimestamp}}@{{#jakarta}}jakarta{{/jakarta}}{{^jakarta}}javax{{/jakarta}}.annotation.Generated(value = "{{generatorClass}}", date = "{{generatedDate}}"){{/hideGenerationTimestamp}} 2 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/csharp/travis.mustache: -------------------------------------------------------------------------------- 1 | # 2 | # Generated by: https://github.com/swagger-api/swagger-codegen.git 3 | # 4 | language: csharp 5 | mono: 6 | - latest 7 | solution: {{{packageName}}}.sln 8 | script: 9 | - /bin/sh ./mono_nunit_test.sh 10 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/typescript-fetch/api_test_default_value.mustache: -------------------------------------------------------------------------------- 1 | {{#example}}{{#isString}}"{{{example}}}"{{/isString}}{{^isString}}{{#isUuid}}"{{{example}}}"{{/isUuid}}{{^isUuid}}{{{example}}}{{/isUuid}}{{/isString}}{{/example}}{{^example}}undefined{{/example}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/resteasy/eap/generatedAnnotation.mustache: -------------------------------------------------------------------------------- 1 | {{^hideGenerationTimestamp}}@{{#jakarta}}jakarta{{/jakarta}}{{^jakarta}}javax{{/jakarta}}.annotation.Generated(value = "{{generatorClass}}", date = "{{generatedDate}}"){{/hideGenerationTimestamp}} 2 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/aspnetcore/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "IncludeScopes": false, 4 | "LogLevel": { 5 | "Default": "Information", 6 | "System": "Information", 7 | "Microsoft": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/csharp-471/travis.mustache: -------------------------------------------------------------------------------- 1 | # 2 | # Generated by: https://github.com/swagger-api/swagger-codegen.git 3 | # 4 | language: csharp 5 | mono: 6 | - latest 7 | solution: {{{packageName}}}.sln 8 | script: 9 | - /bin/sh ./mono_nunit_test.sh 10 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/resteasy/returnTypes.mustache: -------------------------------------------------------------------------------- 1 | {{#returnContainer}}{{#is this 'map-container'}}Map{{/is}}{{#is this 'list-container'}}List<{{{returnType}}}>{{/is}}{{/returnContainer}}{{^returnContainer}}{{{returnType}}}{{/returnContainer}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaSpring/returnTypes.mustache: -------------------------------------------------------------------------------- 1 | {{#returnContainer}}{{#isMapContainer}}Map{{/isMapContainer}}{{#isListContainer}}List<{{{returnType}}}>{{/isListContainer}}{{/returnContainer}}{{^returnContainer}}{{{returnType}}}{{/returnContainer}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaVertXServer/generatedAnnotation.mustache: -------------------------------------------------------------------------------- 1 | {{^hideGenerationTimestamp}} 2 | @{{#jakarta}}jakarta{{/jakarta}}{{^jakarta}}javax{{/jakarta}}.annotation.Generated(value = "{{generatorClass}}", date = "{{generatedDate}}") 3 | {{/hideGenerationTimestamp}} 4 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/pythonFlaskConnexion/requirements.mustache: -------------------------------------------------------------------------------- 1 | connexion >= 2.6.0 2 | connexion[swagger-ui] >= 2.6.0 3 | python_dateutil == 2.6.0 4 | {{#supportPython2}} 5 | typing == 3.5.2.2 6 | {{/supportPython2}} 7 | setuptools >= 21.0.0 8 | swagger-ui-bundle >= 0.0.2 9 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaMicronaut/implicitHeader.mustache: -------------------------------------------------------------------------------- 1 | {{#isHeaderParam}}@ApiImplicitParam(name = "{{{paramName}}}", value = "{{{description}}}", {{#required}}required=true,{{/required}} dataType = "{{{dataType}}}", paramType = "header"){{#hasMore}},{{/hasMore}}{{/isHeaderParam}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaMicronaut/returnTypes.mustache: -------------------------------------------------------------------------------- 1 | {{#returnContainer}}{{#isMapContainer}}Map{{/isMapContainer}}{{#isListContainer}}List<{{{returnType}}}>{{/isListContainer}}{{/returnContainer}}{{^returnContainer}}{{{returnType}}}{{/returnContainer}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/typescript-angular/index.mustache: -------------------------------------------------------------------------------- 1 | export * from './api/api'; 2 | {{#models}} 3 | {{#@first}} 4 | export * from './model/models'; 5 | {{/@first}} 6 | {{/models}} 7 | export * from './variables'; 8 | export * from './configuration'; 9 | export * from './api.module'; -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/cxf/beanValidation.mustache: -------------------------------------------------------------------------------- 1 | {{#required}}{{^useNullableForNotNull}} 2 | @NotNull 3 | {{/useNullableForNotNull}}{{/required}} 4 | {{#useNullableForNotNull}}{{^nullable}} 5 | @NotNull 6 | {{/nullable}}{{/useNullableForNotNull}} 7 | {{>beanValidationCore}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/cxf/queryParams.mustache: -------------------------------------------------------------------------------- 1 | {{#is this 'query-param'}}@QueryParam("{{baseName}}"){{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}{{#defaultValue}}@DefaultValue("{{{defaultValue}}}") {{/defaultValue}}{{{dataType}}} {{paramName}}{{/is}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/spec/beanValidation.mustache: -------------------------------------------------------------------------------- 1 | {{#required}}{{^useNullableForNotNull}} 2 | @NotNull 3 | {{/useNullableForNotNull}}{{/required}} 4 | {{#useNullableForNotNull}}{{^nullable}} 5 | @NotNull 6 | {{/nullable}}{{/useNullableForNotNull}} 7 | {{>beanValidationCore}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/aspnetcore/objectReturn.mustache: -------------------------------------------------------------------------------- 1 | 2 | var example = exampleJson != null 3 | ? JsonConvert.DeserializeObject<{{#returnType}}{{{returnType}}}{{/returnType}}>(exampleJson) 4 | : default({{#returnType}}{{{returnType}}}{{/returnType}}); -------------------------------------------------------------------------------- /src/main/resources/handlebars/pythonFlaskConnexion/tox.mustache: -------------------------------------------------------------------------------- 1 | [tox] 2 | envlist = {{#supportPython2}}py27, {{/supportPython2}}py38 3 | 4 | [testenv] 5 | deps=-r{toxinidir}/requirements.txt 6 | -r{toxinidir}/test-requirements.txt 7 | 8 | commands= 9 | nosetests \ 10 | [] -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/resteasy/beanValidation.mustache: -------------------------------------------------------------------------------- 1 | {{#required}}{{^useNullableForNotNull}} 2 | @NotNull 3 | {{/useNullableForNotNull}}{{/required}} 4 | {{#useNullableForNotNull}}{{^nullable}} 5 | @NotNull 6 | {{/nullable}}{{/useNullableForNotNull}} 7 | {{>beanValidationCore}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/resteasy/queryParams.mustache: -------------------------------------------------------------------------------- 1 | {{#is this 'query-param'}}{{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}{{#defaultValue}} @DefaultValue("{{{defaultValue}}}"){{/defaultValue}} @QueryParam("{{baseName}}") {{{dataType}}} {{paramName}}{{/is}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaMicronaut/pathParams.mustache: -------------------------------------------------------------------------------- 1 | {{#isPathParam}}{{! 2 | PathParam is always required, no @NotNull necessary 3 | }}{{>beanValidationParams}}@Parameter(description = "{{{description}}}") @PathVariable("{{baseName}}") {{>optionalDataType}} {{paramName}}{{/isPathParam}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/dart/auth/authentication.mustache: -------------------------------------------------------------------------------- 1 | part of {{pubName}}.api; 2 | 3 | abstract class Authentication { 4 | 5 | /// Apply authentication settings to header and query params. 6 | void applyToParams(List queryParams, Map headerParams); 7 | } 8 | -------------------------------------------------------------------------------- /src/main/java/io/swagger/codegen/v3/generators/features/GzipFeatures.java: -------------------------------------------------------------------------------- 1 | package io.swagger.codegen.v3.generators.features; 2 | 3 | public interface GzipFeatures { 4 | 5 | String USE_GZIP_FEATURE = "useGzipFeature"; 6 | 7 | void setUseGzipFeature(boolean useGzipFeature); 8 | 9 | } 10 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaVertXServer/package-info-service.mustache: -------------------------------------------------------------------------------- 1 | @ModuleGen(name = "service", groupPackage = "{{apiPackage}}", useFutures = {{#useFuture}}true{{/useFuture}}{{^useFuture}}false{{/useFuture}}) 2 | package {{apiPackage}}; 3 | 4 | import io.vertx.codegen.annotations.ModuleGen; 5 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/pythonFlaskConnexion/__init__model.mustache: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | # flake8: noqa 4 | from __future__ import absolute_import 5 | # import models into model package 6 | {{#models}}{{#model}}from {{modelPackage}}.{{classFilename}} import {{classname}}{{/model}} 7 | {{/models}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/typescript-axios/api.mustache: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | /* eslint-disable */ 3 | {{>licenseInfo}} 4 | {{#apiInfo}} 5 | {{#apis}} 6 | {{#operations}} 7 | export * from './{{tsApiPackage}}/{{classFilename}}'; 8 | {{/operations}} 9 | {{/apis}} 10 | {{/apiInfo}} 11 | 12 | -------------------------------------------------------------------------------- /src/main/java/io/swagger/codegen/v3/generators/features/CXFFeatures.java: -------------------------------------------------------------------------------- 1 | package io.swagger.codegen.v3.generators.features; 2 | 3 | /** 4 | * Features supported by CXF 3 (client + server) 5 | * 6 | */ 7 | public interface CXFFeatures extends LoggingFeatures, GzipFeatures, BeanValidationFeatures { 8 | } 9 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaSpring/implicitHeader.mustache: -------------------------------------------------------------------------------- 1 | {{#isHeaderParam}}{{#useOas2}}@ApiImplicitParam(name = "{{{paramName}}}", value = "{{{description}}}", {{#required}}required=true,{{/required}} dataType = "{{{dataType}}}", paramType = "header"){{#hasMore}},{{/hasMore}}{{/useOas2}}{{/isHeaderParam}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/swagger-static/package.mustache: -------------------------------------------------------------------------------- 1 | { 2 | "name": "swagger-docs", 3 | "version": "1.0.0", 4 | "main": "main.js", 5 | "engines": { 6 | "node": ">= 0.8.x" 7 | }, 8 | "dependencies": { 9 | "express": "3.x" 10 | }, 11 | "license": "Unlicense" 12 | } 13 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/aspnetcore/mapReturn.mustache: -------------------------------------------------------------------------------- 1 | 2 | var example = exampleJson != null 3 | ? JsonConvert.DeserializeObject>(exampleJson) 4 | : new Dictionary<{{#returnType}}{{{returnType}}}{{/returnType}}>(); -------------------------------------------------------------------------------- /src/main/java/io/swagger/codegen/v3/generators/features/SwaggerUIFeatures.java: -------------------------------------------------------------------------------- 1 | package io.swagger.codegen.v3.generators.features; 2 | 3 | public interface SwaggerUIFeatures { 4 | 5 | public static final String USE_SWAGGER_UI = "useSwaggerUI"; 6 | 7 | public void setUseSwaggerUI(boolean useSwaggerUI); 8 | } 9 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaMicronaut/beanValidationParamsInner.mustache: -------------------------------------------------------------------------------- 1 | {{^isPrimitiveType}}{{^isEnum}}{{! 2 | Non-container 3 | }}{{^isContainer}}@Valid {{/isContainer}}{{! 4 | Container 5 | }}{{#isContainer}}{{#items}}{{>beanValidationParamsInner}}{{/items}}{{/isContainer}}{{/isEnum}}{{/isPrimitiveType}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaMicronaut/queryParams.mustache: -------------------------------------------------------------------------------- 1 | {{#isQueryParam}}{{>nullableBeanValidationParams}}@Parameter(description = "{{{description}}}") @QueryValue(value = "{{baseName}}"{{#defaultValue}}, defaultValue = "{{{defaultValue}}}"{{/defaultValue}}) {{>optionalDataType}} {{paramName}}{{/isQueryParam}} -------------------------------------------------------------------------------- /src/main/java/io/swagger/codegen/v3/generators/features/SwaggerFeatures.java: -------------------------------------------------------------------------------- 1 | package io.swagger.codegen.v3.generators.features; 2 | 3 | public interface SwaggerFeatures { 4 | 5 | String USE_SWAGGER_FEATURE = "useSwaggerFeature"; 6 | 7 | void setUseSwaggerFeature(boolean useSwaggerFeature); 8 | 9 | } 10 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/aspnetcore/listReturn.mustache: -------------------------------------------------------------------------------- 1 | 2 | var example = exampleJson != null 3 | ? JsonConvert.DeserializeObject<{{returnContainer}}<{{#returnType}}{{{returnType}}}{{/returnType}}>>(exampleJson) 4 | : Enumerable.Empty<{{#returnType}}{{{returnType}}}{{/returnType}}>(); -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/ApiException.mustache: -------------------------------------------------------------------------------- 1 | package {{apiPackage}}; 2 | 3 | {{>generatedAnnotation}} 4 | public class ApiException extends Exception{ 5 | private int code; 6 | public ApiException (int code, String msg) { 7 | super(msg); 8 | this.code = code; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/scala/client/gradle-wrapper.properties.mustache: -------------------------------------------------------------------------------- 1 | #Tue May 17 23:08:05 CST 2016 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.6-bin.zip 7 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/typescript-axios/index.mustache: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | /* eslint-disable */ 3 | {{>licenseInfo}} 4 | 5 | export * from "./api"; 6 | export * from "./configuration"; 7 | export * from "./models"; 8 | {{#withSeparateModelsAndApi}}export * from "./{{tsModelPackage}}";{{/withSeparateModelsAndApi}} 9 | -------------------------------------------------------------------------------- /src/test/java/io/swagger/codegen/v3/generators/options/OptionsProvider.java: -------------------------------------------------------------------------------- 1 | package io.swagger.codegen.v3.generators.options; 2 | 3 | import java.util.Map; 4 | 5 | public interface OptionsProvider { 6 | 7 | String getLanguage(); 8 | Map createOptions(); 9 | boolean isServer(); 10 | } 11 | -------------------------------------------------------------------------------- /bin/utils/detect_tab_in_java_class.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # grep for \t in the generators 4 | RESULT=`find src/ -name "*.java" | xargs grep $'\t'` 5 | 6 | echo -e "$RESULT" 7 | 8 | if [ "$RESULT" != "" ]; then 9 | echo "Java files contain tab '\\t'. Please remove it and try again." 10 | exit 1; 11 | fi 12 | 13 | -------------------------------------------------------------------------------- /src/main/java/io/swagger/codegen/v3/generators/features/GzipTestFeatures.java: -------------------------------------------------------------------------------- 1 | package io.swagger.codegen.v3.generators.features; 2 | 3 | public interface GzipTestFeatures { 4 | 5 | String USE_GZIP_FEATURE_FOR_TESTS = "useGzipFeatureForTests"; 6 | 7 | void setUseGzipFeatureForTests(boolean useGzipFeatureForTests); 8 | } 9 | -------------------------------------------------------------------------------- /src/main/resources/arguments/java.yaml: -------------------------------------------------------------------------------- 1 | arguments: 2 | - option: "--test-option" 3 | description: "added to verify custom arguments functionality." 4 | type: "string" 5 | - option: "--use-oas2" 6 | description: "use OpenAPI v2.0 (Swagger 1.5.x) annotations (by default, OpenAPI v3.0 is used)." 7 | type: "boolean" 8 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/cxf/server/jboss-web.xml.mustache: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | swagger-cxf-server 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaMicronaut/apiException.mustache: -------------------------------------------------------------------------------- 1 | package {{apiPackage}}; 2 | 3 | {{>generatedAnnotation}} 4 | public class ApiException extends Exception{ 5 | private int code; 6 | public ApiException (int code, String msg) { 7 | super(msg); 8 | this.code = code; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaSpring/apiException.mustache: -------------------------------------------------------------------------------- 1 | package {{apiPackage}}; 2 | 3 | {{>generatedAnnotation}} 4 | public class ApiException extends Exception { 5 | private int code; 6 | public ApiException (int code, String msg) { 7 | super(msg); 8 | this.code = code; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/kotlin-client/data_class_opt_var.mustache: -------------------------------------------------------------------------------- 1 | {{#description}} 2 | /* {{{description}}} */ 3 | {{/description}} 4 | val {{{name}}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{datatype}}}{{/isEnum}}? = {{#defaultvalue}}{{defaultvalue}}{{/defaultvalue}}{{^defaultvalue}}null{{/defaultvalue}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/kotlin-server/data_class_opt_var.mustache: -------------------------------------------------------------------------------- 1 | {{#description}} 2 | /* {{{description}}} */ 3 | {{/description}} 4 | val {{{name}}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{datatype}}}{{/isEnum}}? = {{#defaultvalue}}{{defaultvalue}}{{/defaultvalue}}{{^defaultvalue}}null{{/defaultvalue}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/typescript-axios/modelEnum.mustache: -------------------------------------------------------------------------------- 1 | /** 2 | * {{{description}}} 3 | * @export 4 | * @enum {string} 5 | */ 6 | export enum {{classname}} { 7 | {{#allowableValues}} 8 | {{#enumVars}} 9 | {{{name}}} = {{{value}}}{{^@last}},{{/@last}} 10 | {{/enumVars}} 11 | {{/allowableValues}} 12 | } 13 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/resteasy/ApiException.mustache: -------------------------------------------------------------------------------- 1 | package {{apiPackage}}; 2 | 3 | {{>generatedAnnotation}} 4 | public class ApiException extends Exception{ 5 | private int code; 6 | public ApiException (int code, String msg) { 7 | super(msg); 8 | this.code = code; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/python/__init__model.mustache: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | # flake8: noqa 4 | {{>partial_header}} 5 | 6 | from __future__ import absolute_import 7 | 8 | # import models into model package 9 | {{#models}}{{#model}}from {{modelPackage}}.{{classFilename}} import {{classname}}{{/model}} 10 | {{/models}} 11 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/typescript-fetch/modelEnum.mustache: -------------------------------------------------------------------------------- 1 | /** 2 | * {{{description}}} 3 | * @export 4 | * @enum {string} 5 | */ 6 | export enum {{classname}} { 7 | {{#allowableValues}} 8 | {{#enumVars}} 9 | {{{name}}} = {{{value}}}{{^@last}},{{/@last}} 10 | {{/enumVars}} 11 | {{/allowableValues}} 12 | } 13 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/Java/gradle-wrapper.properties.mustache: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip 4 | networkTimeout=10000 5 | validateDistributionUrl=true 6 | zipStoreBase=GRADLE_USER_HOME 7 | zipStorePath=wrapper/dists 8 | -------------------------------------------------------------------------------- /src/main/java/io/swagger/codegen/v3/generators/features/LoggingTestFeatures.java: -------------------------------------------------------------------------------- 1 | package io.swagger.codegen.v3.generators.features; 2 | 3 | public interface LoggingTestFeatures { 4 | String USE_LOGGING_FEATURE_FOR_TESTS = "useLoggingFeatureForTests"; 5 | 6 | void setUseLoggingFeatureForTests(boolean useLoggingFeatureForTests); 7 | 8 | } 9 | -------------------------------------------------------------------------------- /src/main/java/io/swagger/codegen/v3/generators/features/OptionalFeatures.java: -------------------------------------------------------------------------------- 1 | package io.swagger.codegen.v3.generators.features; 2 | 3 | public interface OptionalFeatures { 4 | 5 | // Language supports generating Optional Types 6 | String USE_OPTIONAL = "useOptional"; 7 | 8 | void setUseOptional(boolean useOptional); 9 | } 10 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/python/tox.mustache: -------------------------------------------------------------------------------- 1 | [tox] 2 | envlist = py3 3 | 4 | [testenv] 5 | deps=-r{toxinidir}/requirements.txt 6 | -r{toxinidir}/test-requirements.txt 7 | 8 | commands= 9 | {{^asyncio}} 10 | nosetests \ 11 | [] 12 | {{/asyncio}} 13 | {{#asyncio}} 14 | pytest -v --cov petstore_api 15 | {{/asyncio}} 16 | -------------------------------------------------------------------------------- /src/main/java/io/swagger/codegen/v3/generators/features/LoggingFeatures.java: -------------------------------------------------------------------------------- 1 | package io.swagger.codegen.v3.generators.features; 2 | 3 | public interface LoggingFeatures extends BeanValidationFeatures { 4 | 5 | String USE_LOGGING_FEATURE = "useLoggingFeature"; 6 | 7 | void setUseLoggingFeature(boolean useLoggingFeature); 8 | 9 | } 10 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/NotFoundException.mustache: -------------------------------------------------------------------------------- 1 | package {{apiPackage}}; 2 | 3 | {{>generatedAnnotation}} 4 | public class NotFoundException extends ApiException { 5 | private int code; 6 | public NotFoundException (int code, String msg) { 7 | super(code, msg); 8 | this.code = code; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaSpring/notFoundException.mustache: -------------------------------------------------------------------------------- 1 | package {{apiPackage}}; 2 | 3 | {{>generatedAnnotation}} 4 | public class NotFoundException extends ApiException { 5 | private int code; 6 | public NotFoundException (int code, String msg) { 7 | super(code, msg); 8 | this.code = code; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/csharp-dotnet2/packages.config.mustache: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/javascript/es6/api-test-response-complex.mustache: -------------------------------------------------------------------------------- 1 | {{#vendorExtensions.x-codegen-model}} 2 | {{#allVars}} 3 | {{#vendorExtensions.x-cache-current-context}} 4 | {{>api-test-response-property}}{{! 5 | }}{{/vendorExtensions.x-cache-current-context}}{{! 6 | }}{{/allVars}}{{! 7 | }}{{/vendorExtensions.x-codegen-model}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/javascript/es6/api-test-response.mustache: -------------------------------------------------------------------------------- 1 | {{! NOTE: unlike parameters and properties there is no way to switch on operation response data type, so use null here: 2 | }}{{#returnTypeIsPrimitive}}null{{/returnTypeIsPrimitive}}{{! 3 | }}{{^returnTypeIsPrimitive}};{{>api-test-response-complex}}{{/returnTypeIsPrimitive}}{{! 4 | }} -------------------------------------------------------------------------------- /src/main/resources/handlebars/kotlin-server/libraries/ktor/Dockerfile.mustache: -------------------------------------------------------------------------------- 1 | FROM openjdk:8-jre-alpine 2 | 3 | COPY ./build/libs/{{artifactId}}.jar /root/{{artifactId}}.jar 4 | 5 | WORKDIR /root 6 | 7 | CMD ["java", "-server", "-Xms4g", "-Xmx4g", "-XX:+UseG1GC", "-XX:MaxGCPauseMillis=100", "-XX:+UseStringDeduplication", "-jar", "{{artifactId}}.jar"] -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaMicronaut/notFoundException.mustache: -------------------------------------------------------------------------------- 1 | package {{apiPackage}}; 2 | 3 | {{>generatedAnnotation}} 4 | public class NotFoundException extends ApiException { 5 | private int code; 6 | public NotFoundException (int code, String msg) { 7 | super(code, msg); 8 | this.code = code; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/scala/akka-http-server/build.sbt.mustache: -------------------------------------------------------------------------------- 1 | version := "{{artifactVersion}}" 2 | name := "{{artifactId}}" 3 | organization := "{{groupId}}" 4 | scalaVersion := "2.12.6" 5 | 6 | libraryDependencies ++= Seq( 7 | "com.typesafe.akka" %% "akka-http" % "10.1.5", 8 | "com.typesafe.akka" %% "akka-stream" % "2.5.16", 9 | ) 10 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/resteasy/NotFoundException.mustache: -------------------------------------------------------------------------------- 1 | package {{apiPackage}}; 2 | 3 | {{>generatedAnnotation}} 4 | public class NotFoundException extends ApiException { 5 | private int code; 6 | public NotFoundException (int code, String msg) { 7 | super(code, msg); 8 | this.code = code; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/spec/formParams.mustache: -------------------------------------------------------------------------------- 1 | {{#is this 'form-param'}}{{#isNot this 'binary'}}@FormParam(value = "{{baseName}}") {{{dataType}}} {{paramName}}{{/isNot}}{{#is this 'binary'}} @FormParam(value = "{{baseName}}") InputStream {{paramName}}InputStream, 2 | @FormParam(value = "{{baseName}}") Attachment {{paramName}}Detail{{/is}}{{/is}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/ruby/model.mustache: -------------------------------------------------------------------------------- 1 | =begin 2 | {{> api_info}} 3 | =end 4 | 5 | require 'date' 6 | 7 | module {{moduleName}} 8 | {{#models}} 9 | {{#model}} 10 | {{#isEnum}} 11 | {{>partial_model_enum_class}} 12 | {{/isEnum}} 13 | {{^isEnum}} 14 | {{>partial_model_generic}} 15 | {{/isEnum}} 16 | {{/model}} 17 | {{/models}} 18 | 19 | end 20 | -------------------------------------------------------------------------------- /src/main/java/io/swagger/codegen/v3/generators/features/JbossFeature.java: -------------------------------------------------------------------------------- 1 | package io.swagger.codegen.v3.generators.features; 2 | 3 | public interface JbossFeature { 4 | 5 | String GENERATE_JBOSS_DEPLOYMENT_DESCRIPTOR = "generateJbossDeploymentDescriptor"; 6 | 7 | void setGenerateJbossDeploymentDescriptor(boolean generateJbossDeploymentDescriptor); 8 | } 9 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/aspnetcore/NuGet.Config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/pythonFlaskConnexion/param_type.mustache: -------------------------------------------------------------------------------- 1 | {{#isString}}str{{/isString}}{{#isInteger}}int{{/isInteger}}{{#isLong}}int{{/isLong}}{{#isFloat}}float{{/isFloat}}{{#isDouble}}float{{/isDouble}}{{#isByteArray}}str{{/isByteArray}}{{#isBinary}}str{{/isBinary}}{{#isBoolean}}bool{{/isBoolean}}{{#isDate}}str{{/isDate}}{{#isDateTime}}str{{/isDateTime}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/cxf/formParams.mustache: -------------------------------------------------------------------------------- 1 | {{#is this 'form-param'}}{{#isNot this 'binary'}}@Multipart(value = "{{baseName}}"{{^required}}, required = false{{/required}}) {{{dataType}}} {{paramName}}{{/isNot}}{{#is this 'binary'}} @Multipart(value = "{{baseName}}" {{^required}}, required = false{{/required}}) Attachment {{paramName}}Detail{{/is}}{{/is}} -------------------------------------------------------------------------------- /src/main/java/io/swagger/codegen/v3/generators/features/BeanValidationFeatures.java: -------------------------------------------------------------------------------- 1 | package io.swagger.codegen.v3.generators.features; 2 | 3 | public interface BeanValidationFeatures { 4 | // Language supports generating BeanValidation-Annotations 5 | String USE_BEANVALIDATION = "useBeanValidation"; 6 | 7 | void setUseBeanValidation(boolean useBeanValidation); 8 | } 9 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaMicronaut/formParams.mustache: -------------------------------------------------------------------------------- 1 | {{#isFormParam}}{{#notFile}}{{>nullableBeanValidationParams}}@Parameter(description = "{{{description}}}") @Body(value = "{{baseName}}") {{{dataType}}} {{paramName}}{{/notFile}}{{#isFile}}@Parameter(description = "file detail") {{#useBeanValidation}}@Valid {{/useBeanValidation}}File {{baseName}}{{/isFile}}{{/isFormParam}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/R/response.mustache: -------------------------------------------------------------------------------- 1 | #' Response Class 2 | #' 3 | #' Response Class 4 | #' @export 5 | Response <- R6::R6Class( 6 | 'Response', 7 | public = list( 8 | content = NULL, 9 | response = NULL, 10 | initialize = function(content, response){ 11 | self$content <- content 12 | self$response <- response 13 | } 14 | ) 15 | ) -------------------------------------------------------------------------------- /src/main/resources/handlebars/go-server/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM golang:1.10 AS build 2 | WORKDIR /go/src 3 | COPY go ./go 4 | COPY main.go . 5 | 6 | ENV CGO_ENABLED=0 7 | RUN go get -d -v ./... 8 | 9 | RUN go build -a -installsuffix cgo -o swagger . 10 | 11 | FROM scratch AS runtime 12 | COPY --from=build /go/src/swagger ./ 13 | EXPOSE 8080/tcp 14 | ENTRYPOINT ["./swagger"] 15 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/typescript-angular/variables.mustache: -------------------------------------------------------------------------------- 1 | import { {{injectionToken}} } from '@angular/core'; 2 | 3 | export const BASE_PATH = new {{injectionToken}}{{#injectionTokenTyped}}{{/injectionTokenTyped}}('basePath'); 4 | export const COLLECTION_FORMATS = { 5 | 'csv': ',', 6 | 'tsv': ' ', 7 | 'ssv': ' ', 8 | 'pipes': '|' 9 | } 10 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/typescript-angular/modelEnum.mustache: -------------------------------------------------------------------------------- 1 | export type {{classname}} = {{#allowableValues}}{{#enumVars}}{{{value}}}{{^@last}} | {{/@last}}{{/enumVars}}{{/allowableValues}}; 2 | 3 | export const {{classname}} = { 4 | {{#allowableValues}} 5 | {{#enumVars}} 6 | {{name}}: {{{value}}} as {{classname}}{{^@last}},{{/@last}} 7 | {{/enumVars}} 8 | {{/allowableValues}} 9 | }; -------------------------------------------------------------------------------- /src/main/resources/handlebars/aspnetcore/build.sh.mustache: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Generated by: https://github.com/swagger-api/swagger-codegen.git 4 | # 5 | 6 | dotnet restore src/{{packageName}}/ && \ 7 | dotnet build src/{{packageName}}/ && \ 8 | echo "Now, run the following to start the project: dotnet run -p src/{{packageName}}/{{packageName}}.csproj --launch-profile web" 9 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/R/partial_header.mustache: -------------------------------------------------------------------------------- 1 | {{#appName}} 2 | # {{{appName}}} 3 | # 4 | {{/appName}} 5 | {{#appDescription}} 6 | # {{{appDescription}}} 7 | # 8 | {{/appDescription}} 9 | # {{#version}}OpenAPI spec version: {{{version}}}{{/version}} 10 | # {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} 11 | # Generated by: https://github.com/swagger-api/swagger-codegen.git 12 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/scala/client/gitignore.mustache: -------------------------------------------------------------------------------- 1 | # scala specific 2 | *.class 3 | *.log 4 | 5 | # sbt specific 6 | .cache 7 | .history 8 | .lib/ 9 | dist/* 10 | target/ 11 | lib_managed/ 12 | src_managed/ 13 | project/boot/ 14 | project/plugins/project/ 15 | 16 | # Scala-IDE specific 17 | .scala_dependencies 18 | .worksheet 19 | 20 | # IntelliJ specific 21 | .idea 22 | *.iml 23 | -------------------------------------------------------------------------------- /src/main/java/io/swagger/codegen/v3/generators/features/UseGenericResponseFeatures.java: -------------------------------------------------------------------------------- 1 | package io.swagger.codegen.v3.generators.features; 2 | 3 | public interface UseGenericResponseFeatures { 4 | // Language supports generating generic Jaxrs or native return types 5 | String USE_GENERIC_RESPONSE = "useGenericResponse"; 6 | 7 | void setUseGenericResponse(boolean useGenericResponse); 8 | } 9 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/go-server/controller-api.mustache: -------------------------------------------------------------------------------- 1 | {{>partial_header}} 2 | package {{packageName}} 3 | 4 | {{#operations}} 5 | import ( 6 | "net/http" 7 | ){{#operation}} 8 | 9 | func {{nickname}}(w http.ResponseWriter, r *http.Request) { 10 | w.Header().Set("Content-Type", "application/json; charset=UTF-8") 11 | w.WriteHeader(http.StatusOK) 12 | }{{/operation}}{{/operations}} 13 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/interface.mustache: -------------------------------------------------------------------------------- 1 | /** 2 | * {{#description}}{{.}}{{/description}}{{^description}}{{classname}}{{/description}} 3 | */ 4 | public interface {{{classname}}} { 5 | 6 | {{#vendorExtensions}} 7 | {{#x-discriminator-type-getter}} 8 | {{x-discriminator-type}} {{x-discriminator-type-getter}}(); 9 | {{/x-discriminator-type-getter}} 10 | {{/vendorExtensions}} 11 | } 12 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/csharp/project.json.mustache: -------------------------------------------------------------------------------- 1 | { 2 | "supports": {}, 3 | "dependencies": { 4 | "FubarCoder.RestSharp.Portable.Core": "4.0.7", 5 | "FubarCoder.RestSharp.Portable.HttpClient": "4.0.7", 6 | "Newtonsoft.Json": "10.0.3", 7 | "JsonSubTypes": "1.2.0" 8 | }, 9 | "frameworks": { 10 | "{{targetFrameworkNuget}}": {} 11 | } 12 | } -------------------------------------------------------------------------------- /src/main/java/io/swagger/codegen/v3/generators/features/PerformBeanValidationFeatures.java: -------------------------------------------------------------------------------- 1 | package io.swagger.codegen.v3.generators.features; 2 | 3 | public interface PerformBeanValidationFeatures { 4 | 5 | // Language supports performing BeanValidation 6 | String PERFORM_BEANVALIDATION = "performBeanValidation"; 7 | 8 | void setPerformBeanValidation(boolean performBeanValidation); 9 | } 10 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaInflector/interface.mustache: -------------------------------------------------------------------------------- 1 | /** 2 | * {{#description}}{{.}}{{/description}}{{^description}}{{classname}}{{/description}} 3 | */ 4 | public interface {{{classname}}} { 5 | 6 | {{#vendorExtensions}} 7 | {{#x-discriminator-type-getter}} 8 | {{x-discriminator-type}} {{x-discriminator-type-getter}}(); 9 | {{/x-discriminator-type-getter}} 10 | {{/vendorExtensions}} 11 | } 12 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/cxf/interface.mustache: -------------------------------------------------------------------------------- 1 | /** 2 | * {{#description}}{{.}}{{/description}}{{^description}}{{classname}}{{/description}} 3 | */ 4 | public interface {{{classname}}} { 5 | 6 | {{#vendorExtensions}} 7 | {{#x-discriminator-type-getter}} 8 | {{x-discriminator-type}} {{x-discriminator-type-getter}}(); 9 | {{/x-discriminator-type-getter}} 10 | {{/vendorExtensions}} 11 | } 12 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/spec/interface.mustache: -------------------------------------------------------------------------------- 1 | /** 2 | * {{#description}}{{.}}{{/description}}{{^description}}{{classname}}{{/description}} 3 | */ 4 | public interface {{{classname}}} { 5 | 6 | {{#vendorExtensions}} 7 | {{#x-discriminator-type-getter}} 8 | {{x-discriminator-type}} {{x-discriminator-type-getter}}(); 9 | {{/x-discriminator-type-getter}} 10 | {{/vendorExtensions}} 11 | } 12 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/csharp-471/project.json.mustache: -------------------------------------------------------------------------------- 1 | { 2 | "supports": {}, 3 | "dependencies": { 4 | "FubarCoder.RestSharp.Portable.Core": "4.0.7", 5 | "FubarCoder.RestSharp.Portable.HttpClient": "4.0.7", 6 | "Newtonsoft.Json": "10.0.3", 7 | "JsonSubTypes": "1.2.0" 8 | }, 9 | "frameworks": { 10 | "{{targetFrameworkNuget}}": {} 11 | } 12 | } -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/cxf-cdi/interface.mustache: -------------------------------------------------------------------------------- 1 | /** 2 | * {{#description}}{{.}}{{/description}}{{^description}}{{classname}}{{/description}} 3 | */ 4 | public interface {{{classname}}} { 5 | 6 | {{#vendorExtensions}} 7 | {{#x-discriminator-type-getter}} 8 | {{x-discriminator-type}} {{x-discriminator-type-getter}}(); 9 | {{/x-discriminator-type-getter}} 10 | {{/vendorExtensions}} 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/io/swagger/codegen/v3/generators/handlebars/IsHelper.java: -------------------------------------------------------------------------------- 1 | package io.swagger.codegen.v3.generators.handlebars; 2 | 3 | import static io.swagger.codegen.v3.VendorExtendable.PREFIX_IS; 4 | 5 | public class IsHelper extends ExtensionHelper { 6 | 7 | public static final String NAME = "is"; 8 | 9 | @Override 10 | public String getPreffix() { 11 | return PREFIX_IS; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/resteasy/eap/interface.mustache: -------------------------------------------------------------------------------- 1 | /** 2 | * {{#description}}{{.}}{{/description}}{{^description}}{{classname}}{{/description}} 3 | */ 4 | public interface {{{classname}}} { 5 | 6 | {{#vendorExtensions}} 7 | {{#x-discriminator-type-getter}} 8 | {{x-discriminator-type}} {{x-discriminator-type-getter}}(); 9 | {{/x-discriminator-type-getter}} 10 | {{/vendorExtensions}} 11 | } 12 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/javascript/es6/model.mustache: -------------------------------------------------------------------------------- 1 | {{>licenseInfo}} 2 | import ApiClient from '../ApiClient'; 3 | {{#imports}} 4 | import {{import}} from './{{import}}'; 5 | {{/imports}} 6 | 7 | {{#models}} 8 | {{#model}} 9 | {{#isEnum}} 10 | {{>partial_model_enum_class}} 11 | {{/isEnum}} 12 | {{^isEnum}} 13 | {{>partial_model_generic}} 14 | {{/isEnum}} 15 | {{/model}} 16 | {{/models}} 17 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/kotlin-server/enum_class.mustache: -------------------------------------------------------------------------------- 1 | /** 2 | * {{{description}}} 3 | * Values: {{#allowableValues}}{{#enumVars}}{{&name}}{{^@last}},{{/@last}}{{/enumVars}}{{/allowableValues}} 4 | */ 5 | enum class {{classname}}(val value: {{dataType}}){ 6 | {{#allowableValues}}{{#enumVars}} 7 | {{&name}}({{{value}}}){{^@last}},{{/@last}}{{#@last}};{{/@last}} 8 | {{/enumVars}}{{/allowableValues}} 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/io/swagger/codegen/v3/generators/handlebars/HasHelper.java: -------------------------------------------------------------------------------- 1 | package io.swagger.codegen.v3.generators.handlebars; 2 | 3 | import static io.swagger.codegen.v3.VendorExtendable.PREFIX_HAS; 4 | 5 | public class HasHelper extends ExtensionHelper { 6 | 7 | public static final String NAME = "has"; 8 | 9 | @Override 10 | public String getPreffix() { 11 | return PREFIX_HAS; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/csharp/partial_header.mustache: -------------------------------------------------------------------------------- 1 | /* 2 | {{#appName}} 3 | * {{{appName}}} 4 | * 5 | {{/appName}} 6 | {{#appDescription}} 7 | * {{{appDescription}}} 8 | * 9 | {{/appDescription}} 10 | * {{#version}}OpenAPI spec version: {{{version}}}{{/version}} 11 | * {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} 12 | * Generated by: https://github.com/swagger-api/swagger-codegen.git 13 | */ 14 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/go/gitignore.mustache: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | *.test 24 | *.prof 25 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/swift5/modelInlineEnumDeclaration.mustache: -------------------------------------------------------------------------------- 1 | public enum {{enumName}}: {{^isContainer}}{{datatype}}{{/isContainer}}{{#isContainer}}String{{/isContainer}}, Codable { {{#allowableValues}}{{#enumVars}} 2 | case {{name}} = {{#isContainer}}"{{/isContainer}}{{#isString}}"{{/isString}}{{{value}}}{{#isString}}"{{/isString}}{{#isContainer}}"{{/isContainer}}{{/enumVars}}{{/allowableValues}} 3 | } 4 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/aspnetcore/build.bat.mustache: -------------------------------------------------------------------------------- 1 | :: Generated by: https://github.com/swagger-api/swagger-codegen.git 2 | :: 3 | 4 | @echo off 5 | 6 | dotnet restore src{{backslash}}{{packageName}} 7 | dotnet build src{{backslash}}{{packageName}} 8 | echo Now, run the following to start the project: dotnet run -p src{{backslash}}{{packageName}}{{backslash}}{{packageName}}.csproj --launch-profile web. 9 | echo. 10 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/aspnetcore/partial_header.mustache: -------------------------------------------------------------------------------- 1 | /* 2 | {{#appName}} 3 | * {{{appName}}} 4 | * 5 | {{/appName}} 6 | {{#appDescription}} 7 | * {{{appDescription}}} 8 | * 9 | {{/appDescription}} 10 | * {{#version}}OpenAPI spec version: {{{version}}}{{/version}} 11 | * {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} 12 | * Generated by: https://github.com/swagger-api/swagger-codegen.git 13 | */ 14 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/csharp-471/partial_header.mustache: -------------------------------------------------------------------------------- 1 | /* 2 | {{#appName}} 3 | * {{{appName}}} 4 | * 5 | {{/appName}} 6 | {{#appDescription}} 7 | * {{{appDescription}}} 8 | * 9 | {{/appDescription}} 10 | * {{#version}}OpenAPI spec version: {{{version}}}{{/version}} 11 | * {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} 12 | * Generated by: https://github.com/swagger-api/swagger-codegen.git 13 | */ 14 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/htmlDocs/formParam.mustache: -------------------------------------------------------------------------------- 1 | {{#is this 'form-param'}}
{{baseName}} {{^required}}(optional){{/required}}{{#required}}(required){{/required}}
2 | 3 |
Form Parameter — {{unescapedDescription}} {{#defaultValue}}default: {{{defaultValue}}} {{/defaultValue}}{{#dataFormat}}format: {{{dataFormat}}}{{/dataFormat}}
{{/is}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/htmlDocs/pathParam.mustache: -------------------------------------------------------------------------------- 1 | {{#is this 'path-param'}}
{{baseName}} {{^required}}(optional){{/required}}{{#required}}(required){{/required}}
2 | 3 |
Path Parameter — {{unescapedDescription}} {{#defaultValue}}default: {{{defaultValue}}} {{/defaultValue}}{{#dataFormat}}format: {{{dataFormat}}}{{/dataFormat}}
{{/is}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/ruby/api_info.mustache: -------------------------------------------------------------------------------- 1 | {{#appName}} 2 | #{{{appName}}} 3 | 4 | {{/appName}} 5 | {{#appDescription}} 6 | #{{{appDescription}}} 7 | 8 | {{/appDescription}} 9 | {{#version}}OpenAPI spec version: {{version}}{{/version}} 10 | {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} 11 | Generated by: https://github.com/swagger-api/swagger-codegen.git 12 | Swagger Codegen version: {{{generatorVersion}}} 13 | -------------------------------------------------------------------------------- /src/main/java/io/swagger/codegen/v3/generators/handlebars/HasNotHelper.java: -------------------------------------------------------------------------------- 1 | package io.swagger.codegen.v3.generators.handlebars; 2 | 3 | import io.swagger.codegen.v3.VendorExtendable; 4 | 5 | public class HasNotHelper extends NoneExtensionHelper { 6 | 7 | public static final String NAME = "hasNot"; 8 | 9 | @Override 10 | public String getPreffix() { 11 | return VendorExtendable.PREFIX_HAS; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/csharp-471/interface.mustache: -------------------------------------------------------------------------------- 1 | /// 2 | /// {{#description}}{{.}}{{/description}}{{^description}}{{classname}}{{/description}} 3 | /// 4 | public interface {{{classname}}} 5 | { 6 | 7 | {{#vendorExtensions}} 8 | {{#x-discriminator-type-getter}} 9 | {{x-discriminator-type}} {{x-discriminator-type-getter}}(); 10 | {{/x-discriminator-type-getter}} 11 | {{/vendorExtensions}} 12 | } 13 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/csharp/interface.mustache: -------------------------------------------------------------------------------- 1 | /// 2 | /// {{#description}}{{.}}{{/description}}{{^description}}{{classname}}{{/description}} 3 | /// 4 | public interface {{{classname}}} 5 | { 6 | 7 | {{#vendorExtensions}} 8 | {{#x-discriminator-type-getter}} 9 | {{x-discriminator-type}} {{x-discriminator-type-getter}}(); 10 | {{/x-discriminator-type-getter}} 11 | {{/vendorExtensions}} 12 | } 13 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/htmlDocs/headerParam.mustache: -------------------------------------------------------------------------------- 1 | {{#is this 'header-param'}}
{{baseName}} {{^required}}(optional){{/required}}{{#required}}(required){{/required}}
2 | 3 |
Header Parameter — {{unescapedDescription}} {{#defaultValue}}default: {{{defaultValue}}} {{/defaultValue}}{{#dataFormat}}format: {{{dataFormat}}}{{/dataFormat}}
{{/is}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/htmlDocs/queryParam.mustache: -------------------------------------------------------------------------------- 1 | {{#is this 'query-param'}}
{{baseName}} {{^required}}(optional){{/required}}{{#required}}(required){{/required}}
2 | 3 |
Query Parameter — {{unescapedDescription}} {{#defaultValue}}default: {{{defaultValue}}} {{/defaultValue}}{{#dataFormat}}format: {{{dataFormat}}}{{/dataFormat}}
{{/is}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/kotlin-server/licenseInfo.mustache: -------------------------------------------------------------------------------- 1 | /** 2 | * {{{appName}}} 3 | * {{{appDescription}}} 4 | * 5 | * {{#version}}OpenAPI spec version: {{{version}}}{{/version}} 6 | * {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ -------------------------------------------------------------------------------- /src/test/java/io/swagger/codegen/v3/generators/options/JavaInflectorServerOptionsProvider.java: -------------------------------------------------------------------------------- 1 | package io.swagger.codegen.v3.generators.options; 2 | 3 | public class JavaInflectorServerOptionsProvider extends JavaOptionsProvider { 4 | @Override 5 | public String getLanguage() { 6 | return "inflector"; 7 | } 8 | 9 | @Override 10 | public boolean isServer() { 11 | return true; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /.github/workflows/dependency-review.yml: -------------------------------------------------------------------------------- 1 | name: 'Dependency Review' 2 | on: [pull_request] 3 | 4 | permissions: 5 | contents: read 6 | 7 | jobs: 8 | dependency-review: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - name: 'Checkout Repository' 12 | uses: actions/checkout@v4 13 | - name: Dependency Review 14 | uses: actions/dependency-review-action@v3 15 | with: 16 | fail-on-severity: high 17 | -------------------------------------------------------------------------------- /src/main/java/io/swagger/codegen/v3/generators/handlebars/IsNotHelper.java: -------------------------------------------------------------------------------- 1 | package io.swagger.codegen.v3.generators.handlebars; 2 | 3 | import io.swagger.codegen.v3.VendorExtendable; 4 | 5 | public class IsNotHelper extends NoneExtensionHelper { 6 | 7 | public static final String NAME = "isNot"; 8 | 9 | 10 | @Override 11 | public String getPreffix() { 12 | return VendorExtendable.PREFIX_IS; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/Java/gitignore.mustache: -------------------------------------------------------------------------------- 1 | *.class 2 | 3 | # Mobile Tools for Java (J2ME) 4 | .mtj.tmp/ 5 | 6 | # Package Files # 7 | *.jar 8 | *.war 9 | *.ear 10 | 11 | # exclude jar for gradle wrapper 12 | !gradle/wrapper/*.jar 13 | 14 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml 15 | hs_err_pid* 16 | 17 | # build files 18 | **/target 19 | target 20 | .gradle 21 | build 22 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/Java/licenseInfo.mustache: -------------------------------------------------------------------------------- 1 | /* 2 | * {{{appName}}} 3 | * {{{appDescription}}} 4 | * 5 | * {{#version}}OpenAPI spec version: {{{version}}}{{/version}} 6 | * {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/spec/RestApplication.mustache: -------------------------------------------------------------------------------- 1 | package {{invokerPackage}}; 2 | 3 | {{#jakarta}} 4 | import jakarta.ws.rs.ApplicationPath; 5 | import jakarta.ws.rs.core.Application; 6 | {{/jakarta}} 7 | {{^jakarta}} 8 | import javax.ws.rs.ApplicationPath; 9 | import javax.ws.rs.core.Application; 10 | {{/jakarta}} 11 | 12 | @ApplicationPath("/") 13 | public class RestApplication extends Application { 14 | 15 | } 16 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/python/partial_header.mustache: -------------------------------------------------------------------------------- 1 | """ 2 | {{#appName}} 3 | {{{appName}}} 4 | {{/appName}} 5 | 6 | {{#appDescription}} 7 | {{{appDescription}}} # noqa: E501 8 | {{/appDescription}} 9 | 10 | {{#version}}OpenAPI spec version: {{{version}}}{{/version}} 11 | {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} 12 | Generated by: https://github.com/swagger-api/swagger-codegen.git 13 | """ 14 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/licenseInfo.mustache: -------------------------------------------------------------------------------- 1 | /* 2 | * {{{appName}}} 3 | * {{{appDescription}}} 4 | * 5 | * {{#version}}OpenAPI spec version: {{{version}}}{{/version}} 6 | * {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/resteasy/RestApplication.mustache: -------------------------------------------------------------------------------- 1 | package {{invokerPackage}}; 2 | 3 | {{#jakarta}} 4 | import jakarta.ws.rs.ApplicationPath; 5 | import jakarta.ws.rs.core.Application; 6 | {{/jakarta}} 7 | {{^jakarta}} 8 | import javax.ws.rs.ApplicationPath; 9 | import javax.ws.rs.core.Application; 10 | {{/jakarta}} 11 | 12 | @ApplicationPath("/") 13 | public class RestApplication extends Application { 14 | 15 | } 16 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/spec/pathParams.mustache: -------------------------------------------------------------------------------- 1 | {{#is this 'path-param'}}{{#useBeanValidation}}{{>beanValidationPathParams}}{{/useBeanValidation}} @PathParam("{{baseName}}") 2 | {{#useOas2}}{{#description}} @ApiParam("{{description}}"){{/description}} {{{dataType}}} {{paramName}}{{/useOas2}} 3 | {{^useOas2}}{{#description}} @Parameter(description = "{{description}}"){{/description}} {{{dataType}}} {{paramName}}{{/useOas2}} 4 | {{/is}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/kotlin-server/libraries/ktor/_response.mustache: -------------------------------------------------------------------------------- 1 | val exampleContentType = "{{{contentType}}}" 2 | val exampleContentString = """{{&example}}""" 3 | 4 | when(exampleContentType) { 5 | "application/json" -> call.respond(gson.fromJson(exampleContentString, empty::class.java)) 6 | "application/xml" -> call.respondText(exampleContentString, ContentType.Text.Xml) 7 | else -> call.respondText(exampleContentString) 8 | } -------------------------------------------------------------------------------- /src/main/resources/handlebars/aspnetcore/wwwroot/web.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/kotlin-client/licenseInfo.mustache: -------------------------------------------------------------------------------- 1 | /** 2 | * {{{appName}}} 3 | * {{{appDescription}}} 4 | * 5 | * {{#version}}OpenAPI spec version: {{{version}}}{{/version}} 6 | * {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/kotlin-server/libraries/ktor/licenseInfo.mustache: -------------------------------------------------------------------------------- 1 | /** 2 | * {{{appName}}} 3 | * {{{appDescription}}} 4 | * 5 | * {{#version}}OpenAPI spec version: {{{version}}}{{/version}} 6 | * {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ -------------------------------------------------------------------------------- /src/main/resources/handlebars/scala/client/licenseInfo.mustache: -------------------------------------------------------------------------------- 1 | /** 2 | * {{{appName}}} 3 | * {{{appDescription}}} 4 | * 5 | * {{#version}}OpenAPI spec version: {{{version}}}{{/version}} 6 | * {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/swift5/_param.mustache: -------------------------------------------------------------------------------- 1 | "{{baseName}}": {{paramName}}{{^isEnum}}{{#isInteger}}{{^required}}?{{/required}}.encodeToJSON(){{/isInteger}}{{#isLong}}{{^required}}?{{/required}}.encodeToJSON(){{/isLong}}{{/isEnum}}{{#isEnum}}{{^isContainer}}{{^required}}?{{/required}}.rawValue{{/isContainer}}{{/isEnum}}{{#isDate}}{{^required}}?{{/required}}.encodeToJSON(){{/isDate}}{{#isDateTime}}{{^required}}?{{/required}}.encodeToJSON(){{/isDateTime}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/typescript-angular/licenseInfo.mustache: -------------------------------------------------------------------------------- 1 | /** 2 | * {{{appName}}} 3 | * {{{appDescription}}} 4 | * 5 | * {{#version}}OpenAPI spec version: {{{version}}}{{/version}} 6 | * {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ -------------------------------------------------------------------------------- /src/main/resources/handlebars/typescript-angular/rxjs-operators.mustache: -------------------------------------------------------------------------------- 1 | // RxJS imports according to https://angular.io/docs/ts/latest/guide/server-communication.html#!#rxjs 2 | 3 | // See node_module/rxjs/Rxjs.js 4 | // Import just the rxjs statics and operators we need for THIS app. 5 | 6 | // Statics 7 | import 'rxjs/add/observable/throw'; 8 | 9 | // Operators 10 | import 'rxjs/add/operator/catch'; 11 | import 'rxjs/add/operator/map'; 12 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/typescript-axios/licenseInfo.mustache: -------------------------------------------------------------------------------- 1 | /** 2 | * {{{appName}}} 3 | * {{{appDescription}}} 4 | * 5 | * {{#version}}OpenAPI spec version: {{{version}}}{{/version}} 6 | * {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/typescript-fetch/licenseInfo.mustache: -------------------------------------------------------------------------------- 1 | /** 2 | * {{{appName}}} 3 | * {{{appDescription}}} 4 | * 5 | * {{#version}}OpenAPI spec version: {{{version}}}{{/version}} 6 | * {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} 7 | * 8 | * NOTE: This file is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the file manually. 11 | */ 12 | -------------------------------------------------------------------------------- /src/main/resources/mustache/typescript-fetch/licenseInfo.mustache: -------------------------------------------------------------------------------- 1 | /** 2 | * {{{appName}}} 3 | * {{{appDescription}}} 4 | * 5 | * {{#version}}OpenAPI spec version: {{{version}}}{{/version}} 6 | * {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} 7 | * 8 | * NOTE: This file is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the file manually. 11 | */ 12 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/javascript/licenseInfo.mustache: -------------------------------------------------------------------------------- 1 | /** 2 | * {{{appName}}} 3 | * {{{appDescription}}} 4 | * 5 | * {{#version}}OpenAPI spec version: {{{version}}}{{/version}} 6 | * {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | * 12 | */ 13 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/python/travis.mustache: -------------------------------------------------------------------------------- 1 | # ref: https://docs.travis-ci.com/user/languages/python 2 | language: python 3 | python: 4 | - "3.2" 5 | - "3.3" 6 | - "3.4" 7 | - "3.5" 8 | #- "3.5-dev" # 3.5 development branch 9 | #- "nightly" # points to the latest development branch e.g. 3.6-dev 10 | # command to install dependencies 11 | install: "pip install -r requirements.txt" 12 | # command to run tests 13 | script: nosetests 14 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/swift4/modelInlineEnumDeclaration.mustache: -------------------------------------------------------------------------------- 1 | public enum {{enumName}}: {{#isNot this 'container'}}{{datatype}}{{/isNot}}{{#is this 'container'}}String{{/is}}, Codable { {{#allowableValues}}{{#enumVars}} 2 | case {{name}} = {{#is ../../this 'container'}}"{{/is}}{{#is ../../this 'string'}}"{{/is}}{{{value}}}{{#is ../../this 'string'}}"{{/is}}{{#is ../../this 'container'}}"{{/is}}{{/enumVars}}{{/allowableValues}} 3 | } 4 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/go/partial_header.mustache: -------------------------------------------------------------------------------- 1 | /* 2 | {{#appName}} 3 | * {{{appName}}} 4 | * 5 | {{/appName}} 6 | {{#appDescription}} 7 | * {{{appDescription}}} 8 | * 9 | {{/appDescription}} 10 | {{#version}} 11 | * API version: {{{version}}} 12 | {{/version}} 13 | {{#infoEmail}} 14 | * Contact: {{{infoEmail}}} 15 | {{/infoEmail}} 16 | * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) 17 | */ 18 | -------------------------------------------------------------------------------- /src/main/java/io/swagger/codegen/v3/generators/features/BeanValidationExtendedFeatures.java: -------------------------------------------------------------------------------- 1 | package io.swagger.codegen.v3.generators.features; 2 | 3 | public interface BeanValidationExtendedFeatures { 4 | 5 | // Language (implementing Client/Server) supports automatic BeanValidation (1.1) 6 | String USE_BEANVALIDATION_FEATURE = "useBeanValidationFeature"; 7 | 8 | void setUseBeanValidationFeature(boolean useBeanValidationFeature); 9 | 10 | } 11 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaSpring/libraries/spring-cloud/application-test.mustache: -------------------------------------------------------------------------------- 1 | spring: 2 | application: 3 | name: {{artifactId}}-test 4 | jackson: 5 | serialization.WRITE_DATES_AS_TIMESTAMPS: false 6 | 7 | hystrix.command.default.execution.timeout.enabled: false 8 | 9 | logging.level.{{apiPackage}}: DEBUG 10 | 11 | feign.hystrix.enabled: true 12 | 13 | {{#wiremock}} 14 | wiremock.base.path: http://localhost:33333 15 | {{/wiremock}} 16 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/go-server/partial_header.mustache: -------------------------------------------------------------------------------- 1 | /* 2 | {{#appName}} 3 | * {{{appName}}} 4 | * 5 | {{/appName}} 6 | {{#appDescription}} 7 | * {{{appDescription}}} 8 | * 9 | {{/appDescription}} 10 | {{#version}} 11 | * API version: {{{version}}} 12 | {{/version}} 13 | {{#infoEmail}} 14 | * Contact: {{{infoEmail}}} 15 | {{/infoEmail}} 16 | * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) 17 | */ 18 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/Java/libraries/retrofit/formParams.mustache: -------------------------------------------------------------------------------- 1 | {{~#is this 'form-param'}}{{#isNot this 'binary'}}{{#is ../this 'multipart'}}@retrofit.http.Part{{/is}}{{#isNot ../this 'multipart'}}@retrofit.http.Field{{/isNot}}("{{baseName}}") {{{dataType}}} {{paramName}}{{/isNot}}{{#is this 'binary'}}{{#is ../this 'multipart'}}@retrofit.http.Part{{/is}}{{#isNot ../this 'multipart'}}@retrofit.http.Field{{/isNot}}("{{baseName}}") TypedFile {{paramName}}{{/is}}{{/is}} -------------------------------------------------------------------------------- /src/main/java/io/swagger/codegen/v3/generators/features/NotNullAnnotationFeatures.java: -------------------------------------------------------------------------------- 1 | package io.swagger.codegen.v3.generators.features; 2 | 3 | public interface NotNullAnnotationFeatures { 4 | 5 | // Language supports generating not Null Jackson Annotation 6 | String NOT_NULL_JACKSON_ANNOTATION = "notNullJacksonAnnotation"; 7 | 8 | void setNotNullJacksonAnnotation(boolean notNullJacksonAnnotation); 9 | 10 | boolean isNotNullJacksonAnnotation(); 11 | } -------------------------------------------------------------------------------- /src/main/resources/handlebars/Java/travis.mustache: -------------------------------------------------------------------------------- 1 | # 2 | # Generated by: https://github.com/swagger-api/swagger-codegen.git 3 | # 4 | language: java 5 | jdk: 6 | - oraclejdk8 7 | - oraclejdk7 8 | before_install: 9 | # ensure gradlew has proper permission 10 | - chmod a+x ./gradlew 11 | script: 12 | # test using maven 13 | - mvn test 14 | # uncomment below to test using gradle 15 | # - gradle test 16 | # uncomment below to test using sbt 17 | # - sbt test 18 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/Java/xmlAnnotation.mustache: -------------------------------------------------------------------------------- 1 | {{#withXml}} 2 | @XmlRootElement({{#xmlNamespace}}namespace="{{xmlNamespace}}", {{/xmlNamespace}}name = "{{#xmlName}}{{xmlName}}{{/xmlName}}{{^xmlName}}{{classname}}{{/xmlName}}") 3 | @XmlAccessorType(XmlAccessType.FIELD) 4 | {{#jackson}}@JacksonXmlRootElement({{#xmlNamespace}}namespace="{{xmlNamespace}}", {{/xmlNamespace}}localName = "{{#xmlName}}{{xmlName}}{{/xmlName}}{{^xmlName}}{{classname}}{{/xmlName}}"){{/jackson}}{{/withXml}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/aspnetcore/README.mustache: -------------------------------------------------------------------------------- 1 | # {{packageName}} - ASP.NET Core 2.0 Server 2 | 3 | {{#appDescription}} 4 | {{{appDescription}}} 5 | {{/appDescription}} 6 | 7 | ## Run 8 | 9 | Linux/OS X: 10 | 11 | ``` 12 | sh build.sh 13 | ``` 14 | 15 | Windows: 16 | 17 | ``` 18 | build.bat 19 | ``` 20 | 21 | ## Run in Docker 22 | 23 | ``` 24 | cd src/{{packageName}} 25 | docker build -t {{dockerTag}} . 26 | docker run -p 5000:5000 {{dockerTag}} 27 | ``` 28 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/kotlin-server/libraries/ktor/_principal.mustache: -------------------------------------------------------------------------------- 1 | {{#authMethods}} 2 | {{#@first}} 3 | {{#or isBasic isBearer}} 4 | val principal = call.authentication.principal() 5 | {{/or}} 6 | {{#isApiKey}} 7 | val principal = call.authentication.principal() 8 | {{/isApiKey}} 9 | {{#isOAuth}} 10 | val principal = call.authentication.principal() 11 | {{/isOAuth}} 12 | {{/@first}} 13 | {{/authMethods}} 14 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/php/partial_header.mustache: -------------------------------------------------------------------------------- 1 | /** 2 | {{#appName}} 3 | * {{{appName}}} 4 | * 5 | {{/appName}} 6 | {{#appDescription}} 7 | * {{{appDescription}}} 8 | * 9 | {{/appDescription}} 10 | * {{#version}}OpenAPI spec version: {{{version}}}{{/version}} 11 | * {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} 12 | * Generated by: https://github.com/swagger-api/swagger-codegen.git 13 | * Swagger Codegen version: {{{generatorVersion}}} 14 | */ 15 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/swift3/_param.mustache: -------------------------------------------------------------------------------- 1 | "{{baseName}}": {{paramName}}{{#isNot this 'enum'}}{{#is this 'integer'}}{{^required}}?{{/required}}.encodeToJSON(){{/is}}{{#is this 'long'}}{{^required}}?{{/required}}.encodeToJSON(){{/is}}{{/isNot}}{{#is this 'enum'}}{{#isNot this 'container'}}{{^required}}?{{/required}}.rawValue{{/isNot}}{{/is}}{{#is this 'date'}}{{^required}}?{{/required}}.encodeToJSON(){{/is}}{{#is this 'date-time'}}{{^required}}?{{/required}}.encodeToJSON(){{/is}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/swift4/_param.mustache: -------------------------------------------------------------------------------- 1 | "{{baseName}}": {{paramName}}{{#isNot this 'enum'}}{{#is this 'integer'}}{{^required}}?{{/required}}.encodeToJSON(){{/is}}{{#is this 'long'}}{{^required}}?{{/required}}.encodeToJSON(){{/is}}{{/isNot}}{{#is this 'enum'}}{{#isNot this 'container'}}{{^required}}?{{/required}}.rawValue{{/isNot}}{{/is}}{{#is this 'date'}}{{^required}}?{{/required}}.encodeToJSON(){{/is}}{{#is this 'date-time'}}{{^required}}?{{/required}}.encodeToJSON(){{/is}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/typescript-angular/apis.mustache: -------------------------------------------------------------------------------- 1 | {{#apiInfo}} 2 | {{#apis}} 3 | {{#operations}} 4 | export * from './{{ classFilename }}'; 5 | import { {{ classname }} } from './{{ classFilename }}'; 6 | {{/operations}} 7 | {{#withInterfaces}} 8 | export * from './{{ classFilename }}Interface' 9 | {{/withInterfaces}} 10 | {{/apis}} 11 | export const APIS = [{{#apis}}{{#operations}}{{ classname }}{{/operations}}{{^@last}}, {{/@last}}{{/apis}}]; 12 | {{/apiInfo}} 13 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/cxf-cdi/formParams.mustache: -------------------------------------------------------------------------------- 1 | {{#is this 'form-param'}}{{#isNot this 'binary'}}@Multipart(value = "{{baseName}}"{{^required}}, required = false{{/required}}) {{{dataType}}} {{paramName}}{{/isNot}}{{#is this 'binary'}} @Multipart(value = "{{baseName}}"{{^required}}, required = false{{/required}}) InputStream {{paramName}}InputStream, @Multipart(value = "{{baseName}}" {{^required}}, required = false{{/required}}) Attachment {{paramName}}Detail{{/is}}{{/is}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaMicronaut/beanValidation.mustache: -------------------------------------------------------------------------------- 1 | {{#required}}{{^useNullableForNotNull}} 2 | @NotNull 3 | {{/useNullableForNotNull}}{{/required}} 4 | {{#useNullableForNotNull}}{{^nullable}} 5 | @NotNull 6 | {{/nullable}}{{/useNullableForNotNull}}{{#isContainer}}{{^isPrimitiveType}}{{^isEnum}} 7 | @Valid{{/isEnum}}{{/isPrimitiveType}}{{/isContainer}}{{#isNotContainer}}{{^isPrimitiveType}} 8 | @Valid{{/isPrimitiveType}}{{/isNotContainer}} 9 | {{>beanValidationCore}} -------------------------------------------------------------------------------- /src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled class file 2 | *.class 3 | 4 | # Log file 5 | *.log 6 | 7 | # Temporary files 8 | *.tmp 9 | tmp/ 10 | 11 | # BlueJ files 12 | *.ctxt 13 | 14 | # Visual Studio Code 15 | .project 16 | .vscode 17 | 18 | # Mobile Tools for Java (J2ME) 19 | .mtj.tmp/ 20 | 21 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml 22 | hs_err_pid* 23 | 24 | .idea 25 | *.iml 26 | target/ 27 | test-output/ 28 | 29 | .classpath 30 | .settings/ 31 | -------------------------------------------------------------------------------- /src/main/resources/arguments/aspnetcore.yaml: -------------------------------------------------------------------------------- 1 | arguments: 2 | - option: "--aspnet-core-version" 3 | description: "aspnetcore version to use, current options are: 2.0, 2.1, 2.2 and 3.0 (default)" 4 | type: "string" 5 | - option: "--interface-only" 6 | description: "creates interfaces controller only" 7 | type: "boolean" 8 | - option: "--interface-controller" 9 | description: "creates interfaces and default implementation for controllers" 10 | type: "boolean" 11 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/cxf-cdi/RestApplication.mustache: -------------------------------------------------------------------------------- 1 | package {{invokerPackage}}; 2 | 3 | {{#jakarta}} 4 | import jakarta.ws.rs.ApplicationPath; 5 | import jakarta.ws.rs.core.Application; 6 | {{/jakarta}} 7 | {{^jakarta}} 8 | import javax.ws.rs.ApplicationPath; 9 | import javax.ws.rs.core.Application; 10 | {{/jakarta}} 11 | 12 | @ApplicationPath("/") 13 | public class RestApplication extends Application { 14 | // Add implementation-specific details here 15 | } 16 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/kotlin-client/enum_class.mustache: -------------------------------------------------------------------------------- 1 | /** 2 | * {{{description}}} 3 | * Values: {{#allowableValues}}{{#enumVars}}{{&name}}{{^@last}},{{/@last}}{{/enumVars}}{{/allowableValues}} 4 | */ 5 | enum class {{classname}}(val value: {{dataType}}{{#isNullable}}?{{/isNullable}}){ 6 | {{#allowableValues}}{{#enumVars}} 7 | {{&name}}({{#value}}{{{value}}}{{/value}}{{^value}}null{{/value}}){{^@last}},{{/@last}}{{#@last}};{{/@last}}// :/ 8 | {{/enumVars}}{{/allowableValues}} 9 | } -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/apiServiceFactory.mustache: -------------------------------------------------------------------------------- 1 | package {{package}}.factories; 2 | 3 | import {{package}}.{{classname}}Service; 4 | import {{package}}.impl.{{classname}}ServiceImpl; 5 | 6 | {{>generatedAnnotation}} 7 | public class {{classname}}ServiceFactory { 8 | private final static {{classname}}Service service = new {{classname}}ServiceImpl(); 9 | 10 | public static {{classname}}Service get{{classname}}() { 11 | return service; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaSpring/beanValidation.mustache: -------------------------------------------------------------------------------- 1 | {{#required}}{{^useNullableForNotNull}} 2 | @NotNull 3 | {{/useNullableForNotNull}}{{/required}} 4 | {{#useNullableForNotNull}}{{^nullable}} 5 | @NotNull 6 | {{/nullable}}{{/useNullableForNotNull}}{{#isContainer}}{{^isPrimitiveType}}{{^isEnum}} 7 | @Valid{{/isEnum}}{{/isPrimitiveType}}{{/isContainer}}{{#isNotContainer}}{{^isPrimitiveType}} 8 | @Valid{{/isPrimitiveType}}{{/isNotContainer}} 9 | {{>beanValidationCore}} 10 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaMicronaut/xmlAnnotation.mustache: -------------------------------------------------------------------------------- 1 | {{#withXml}} 2 | {{#jackson}} 3 | @JacksonXmlRootElement({{#xmlNamespace}}namespace="{{xmlNamespace}}", {{/xmlNamespace}}localName = "{{#xmlName}}{{xmlName}}{{/xmlName}}{{^xmlName}}{{classname}}{{/xmlName}}") 4 | {{/jackson}} 5 | @XmlRootElement({{#xmlNamespace}}namespace="{{xmlNamespace}}", {{/xmlNamespace}}name = "{{#xmlName}}{{xmlName}}{{/xmlName}}{{^xmlName}}{{classname}}{{/xmlName}}") 6 | @XmlAccessorType(XmlAccessType.FIELD){{/withXml}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaSpring/xmlAnnotation.mustache: -------------------------------------------------------------------------------- 1 | {{#withXml}} 2 | {{#jackson}} 3 | @JacksonXmlRootElement({{#xmlNamespace}}namespace="{{xmlNamespace}}", {{/xmlNamespace}}localName = "{{#xmlName}}{{xmlName}}{{/xmlName}}{{^xmlName}}{{classname}}{{/xmlName}}") 4 | {{/jackson}} 5 | @XmlRootElement({{#xmlNamespace}}namespace="{{xmlNamespace}}", {{/xmlNamespace}}name = "{{#xmlName}}{{xmlName}}{{/xmlName}}{{^xmlName}}{{classname}}{{/xmlName}}") 6 | @XmlAccessorType(XmlAccessType.FIELD){{/withXml}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaVertXServer/beanValidation.mustache: -------------------------------------------------------------------------------- 1 | {{#required}}{{^useNullableForNotNull}} 2 | @NotNull 3 | {{/useNullableForNotNull}}{{/required}} 4 | {{#useNullableForNotNull}}{{^nullable}} 5 | @NotNull 6 | {{/nullable}}{{/useNullableForNotNull}}{{#isContainer}}{{^isPrimitiveType}}{{^isEnum}} 7 | @Valid{{/isEnum}}{{/isPrimitiveType}}{{/isContainer}}{{#isNotContainer}}{{^isPrimitiveType}} 8 | @Valid{{/isPrimitiveType}}{{/isNotContainer}} 9 | {{>beanValidationCore}} 10 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/kotlin-server/model.mustache: -------------------------------------------------------------------------------- 1 | {{>licenseInfo}} 2 | package {{modelPackage}} 3 | 4 | {{#imports}}import {{import}} 5 | {{/imports}} 6 | {{#threetenbp}} 7 | import org.threeten.bp.LocalDateTime 8 | {{/threetenbp}} 9 | 10 | {{#models}} 11 | {{#model}} 12 | {{#is this 'alias'}}typealias {{classname}} = {{{dataType}}}{{/is}}{{#isNot this 'alias'}}{{#is this 'enum'}}{{>enum_class}}{{/is}}{{#isNot this 'enum'}}{{>data_class}}{{/isNot}}{{/isNot}} 13 | {{/model}} 14 | {{/models}} 15 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/dart/auth/http_basic_auth.mustache: -------------------------------------------------------------------------------- 1 | part of {{pubName}}.api; 2 | 3 | class HttpBasicAuth implements Authentication { 4 | 5 | String username; 6 | String password; 7 | 8 | @override 9 | void applyToParams(List queryParams, Map headerParams) { 10 | String str = (username == null ? "" : username) + ":" + (password == null ? "" : password); 11 | headerParams["Authorization"] = "Basic " + base64.encode(utf8.encode(str)); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/spec/headerParams.mustache: -------------------------------------------------------------------------------- 1 | {{#is this 'header-param'}}{{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}} @HeaderParam("{{baseName}}"){{#defaultValue}} @DefaultValue("{{{defaultValue}}}"){{/defaultValue}} 2 | {{#useOas2}}{{#description}} @ApiParam("{{description}}"){{/description}} {{{dataType}}} {{paramName}}{{/useOas2}} 3 | {{^useOas2}}{{#description}} @Parameter(description = "{{description}}"){{/description}} {{{dataType}}} {{paramName}}{{/useOas2}} 4 | {{/is}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/spec/queryParams.mustache: -------------------------------------------------------------------------------- 1 | {{#is this 'query-param'}}{{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}} @QueryParam("{{baseName}}"){{#defaultValue}} @DefaultValue("{{{defaultValue}}}"){{/defaultValue}} 2 | {{#useOas2}}{{#description}} @ApiParam("{{description}}"){{/description}} {{{dataType}}} {{paramName}}{{/useOas2}} 3 | {{^useOas2}}{{#description}} @Parameter(description = "{{description}}"){{/description}} {{{dataType}}} {{paramName}}{{/useOas2}} 4 | {{/is}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/typescript-angular/modelGeneric.mustache: -------------------------------------------------------------------------------- 1 | export interface {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{ {{>modelGenericAdditionalProperties}} 2 | {{#vars}} 3 | {{#description}} 4 | /** 5 | * {{{description}}} 6 | */ 7 | {{/description}} 8 | {{#is this 'read-only'}}readonly {{/is}}{{name}}{{^required}}?{{/required}}: {{#is this 'enum'}}{{{datatypeWithEnum}}}{{/is}}{{#isNot this 'enum'}}{{{datatype}}}{{/isNot}}; 9 | {{/vars}} 10 | }{{>modelGenericEnums}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaInflector/inflector.mustache: -------------------------------------------------------------------------------- 1 | controllerPackage: {{invokerPackage}} 2 | {{#hasModel}}modelPackage: {{modelPackage}}{{/hasModel}} 3 | swaggerUrl: ./src/main/resources/openapi3.yaml 4 | modelMappings: 5 | # to enable explicit mappings, use this syntax: 6 | DefinitionFromSwaggerSpecification: fully.qualified.path.to.Model 7 | {{#models}}{{#model}}{{classname}} : {{modelPackage}}.{{classname}}{{/model}} 8 | {{/models}} 9 | 10 | entityProcessors: 11 | - json 12 | - xml 13 | - yaml -------------------------------------------------------------------------------- /src/main/resources/handlebars/pythonFlaskConnexion/travis.mustache: -------------------------------------------------------------------------------- 1 | # ref: https://docs.travis-ci.com/user/languages/python 2 | language: python 3 | python: 4 | {{#supportPython2}} 5 | - "2.7" 6 | {{/supportPython2}} 7 | - "3.2" 8 | - "3.3" 9 | - "3.4" 10 | - "3.5" 11 | #- "3.5-dev" # 3.5 development branch 12 | #- "nightly" # points to the latest development branch e.g. 3.6-dev 13 | # command to install dependencies 14 | install: "pip install -r requirements.txt" 15 | # command to run tests 16 | script: nosetests 17 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/swift3/Configuration.mustache: -------------------------------------------------------------------------------- 1 | // Configuration.swift 2 | // 3 | // Generated by swagger-codegen 4 | // https://github.com/swagger-api/swagger-codegen 5 | // 6 | 7 | import Foundation 8 | 9 | open class Configuration { 10 | 11 | // This value is used to configure the date formatter that is used to serialize dates into JSON format. 12 | // You must set it prior to encoding any dates, and it will only be read once. 13 | open static var dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ" 14 | 15 | } 16 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/swift4/Configuration.mustache: -------------------------------------------------------------------------------- 1 | // Configuration.swift 2 | // 3 | // Generated by swagger-codegen 4 | // https://github.com/swagger-api/swagger-codegen 5 | // 6 | 7 | import Foundation 8 | 9 | open class Configuration { 10 | 11 | // This value is used to configure the date formatter that is used to serialize dates into JSON format. 12 | // You must set it prior to encoding any dates, and it will only be read once. 13 | open static var dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ" 14 | 15 | } -------------------------------------------------------------------------------- /src/main/resources/handlebars/swift5/Configuration.mustache: -------------------------------------------------------------------------------- 1 | // Configuration.swift 2 | // 3 | // Generated by swagger-codegen 4 | // https://github.com/swagger-api/swagger-codegen 5 | // 6 | 7 | import Foundation 8 | 9 | open class Configuration { 10 | 11 | // This value is used to configure the date formatter that is used to serialize dates into JSON format. 12 | // You must set it prior to encoding any dates, and it will only be read once. 13 | public static var dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ" 14 | 15 | } -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/cxf-cdi/beans.mustache: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 12 | 13 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/kotlin-client/model.mustache: -------------------------------------------------------------------------------- 1 | {{>licenseInfo}} 2 | package {{modelPackage}} 3 | 4 | {{#imports}}import {{import}} 5 | {{/imports}} 6 | {{#threetenbp}} 7 | import org.threeten.bp.LocalDateTime 8 | {{/threetenbp}} 9 | 10 | {{#models}} 11 | {{#model}} 12 | {{#is this 'alias'}} 13 | typealias {{classname}} = {{dataType}} 14 | {{/is}} 15 | {{#isNot this 'alias'}} 16 | {{#is this 'enum'}}{{>enum_class}}{{/is}} 17 | {{#isNot this 'enum'}}{{>data_class}}{{/isNot}} 18 | {{/isNot}} 19 | {{/model}} 20 | {{/models}} 21 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/typescript-fetch/tsconfig.mustache: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "declaration": true, 4 | "target": "{{#supportsES6}}es6{{/supportsES6}}{{^supportsES6}}es5{{/supportsES6}}", 5 | "module": "commonjs", 6 | "noImplicitAny": true, 7 | "outDir": "dist", 8 | "rootDir": "."{{^supportsES6}}, 9 | "lib": [ 10 | "es6", 11 | "dom" 12 | ] 13 | {{/supportsES6}} 14 | }, 15 | "exclude": [ 16 | "dist", 17 | "node_modules", 18 | "**/*.spec.ts" 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /src/main/resources/mustache/typescript-fetch/tsconfig.mustache: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "declaration": true, 4 | "target": "{{#supportsES6}}es6{{/supportsES6}}{{^supportsES6}}es5{{/supportsES6}}", 5 | "module": "commonjs", 6 | "noImplicitAny": true, 7 | "outDir": "dist", 8 | "rootDir": "."{{^supportsES6}}, 9 | "lib": [ 10 | "es6", 11 | "dom" 12 | ] 13 | {{/supportsES6}} 14 | }, 15 | "exclude": [ 16 | "dist", 17 | "node_modules", 18 | "**/*.spec.ts" 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/R/description.mustache: -------------------------------------------------------------------------------- 1 | Package: {{{packageName}}} 2 | Title: R Package Client for {{{appName}}} 3 | Version: {{packageVersion}} 4 | Authors@R: person("Swagger Codegen community", email = "apiteam@swagger.io", role = c("aut", "cre")) 5 | Description: {{{appDescription}}}{{^appDescription}}R Package Client for {{{appName}}}{{/appDescription}} 6 | Depends: R (>= 3.3.3) 7 | Encoding: UTF-8 8 | License: Unlicense 9 | LazyData: true 10 | Suggests: testthat 11 | Imports: jsonlite, httr, R6 12 | RoxygenNote: 6.0.1.9000 13 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/swift4/model.mustache: -------------------------------------------------------------------------------- 1 | {{#models}}{{#model}}// 2 | // {{classname}}.swift 3 | // 4 | // Generated by swagger-codegen 5 | // https://github.com/swagger-api/swagger-codegen 6 | // 7 | 8 | import Foundation 9 | 10 | {{#description}} 11 | /** {{description}} */{{/description~}} 12 | {{#is this 'array-model'}} 13 | {{> modelArray}} 14 | {{/is}}{{#isNot this 'array-model'}}{{#is this 'enum'}} 15 | {{> modelEnum}} 16 | {{/is~}}{{#isNot this 'enum'}} 17 | {{> modelObject}} 18 | {{/isNot}}{{/isNot}}{{/model}}{{/models~}} 19 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/Java/beanValidation.mustache: -------------------------------------------------------------------------------- 1 | {{#required}}{{^useNullableForNotNull}} 2 | @NotNull 3 | {{/useNullableForNotNull}}{{/required}} 4 | {{#useNullableForNotNull}}{{^nullable}} 5 | @NotNull 6 | {{/nullable}}{{/useNullableForNotNull}} 7 | {{#is this 'container'}} 8 | {{#isNot this 'primitive-type'}} 9 | {{#isNot this 'enum'}} 10 | @Valid 11 | {{/isNot}} 12 | {{/isNot}} 13 | {{/is}} 14 | {{#isNot this 'container'}} 15 | {{#isNot this 'primitive-type'}} 16 | @Valid 17 | {{/isNot}} 18 | {{/isNot}} 19 | {{>beanValidationCore}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/dart/auth/oauth.mustache: -------------------------------------------------------------------------------- 1 | part of {{pubName}}.api; 2 | 3 | class OAuth implements Authentication { 4 | String accessToken; 5 | 6 | OAuth({this.accessToken}) { 7 | } 8 | 9 | @override 10 | void applyToParams(List queryParams, Map headerParams) { 11 | if (accessToken != null) { 12 | headerParams["Authorization"] = "Bearer " + accessToken; 13 | } 14 | } 15 | 16 | void setAccessToken(String accessToken) { 17 | this.accessToken = accessToken; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/javascript/es6/licenseInfo.mustache: -------------------------------------------------------------------------------- 1 | /* 2 | * {{{appName}}} 3 | * {{{appDescription}}} 4 | * 5 | {{#version}} 6 | * OpenAPI spec version: {{{version}}} 7 | {{/version}} 8 | {{#infoEmail}} 9 | * Contact: {{{infoEmail}}} 10 | {{/infoEmail}} 11 | * 12 | * NOTE: This class is auto generated by the swagger code generator program. 13 | * https://github.com/swagger-api/swagger-codegen.git 14 | * 15 | * Swagger Codegen version: {{{generatorVersion}}} 16 | * 17 | * Do not edit the class manually. 18 | * 19 | */ 20 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/cxf-cdi/beanValidation.mustache: -------------------------------------------------------------------------------- 1 | {{#required}}{{^useNullableForNotNull}} 2 | @NotNull 3 | {{/useNullableForNotNull}}{{/required}} 4 | {{#useNullableForNotNull}}{{^nullable}} 5 | @NotNull 6 | {{/nullable}}{{/useNullableForNotNull}} 7 | {{#isContainer}} 8 | {{^isPrimitiveType}} 9 | {{^isEnum}} 10 | @Valid 11 | {{/isEnum}} 12 | {{/isPrimitiveType}} 13 | {{/isContainer}} 14 | {{#isNotContainer}} 15 | {{^isPrimitiveType}} 16 | @Valid 17 | {{/isPrimitiveType}} 18 | {{/isNotContainer}} 19 | {{>beanValidationCore}} 20 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/resteasy/eap/bodyParams.mustache: -------------------------------------------------------------------------------- 1 | {{#is this 'body-param'}}{{#useOas2}}@ApiParam(value = "{{{description}}}" {{#required}},required=true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}) {{{dataType}}} {{paramName}}{{/useOas2}}{{^useOas2}}@Parameter(description = "{{{description}}}" {{#required}},required=true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}) {{{dataType}}} {{paramName}}{{/useOas2}}{{/is}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaSpring/allowableValues.mustache: -------------------------------------------------------------------------------- 1 | {{#useOas2}} 2 | {{#allowableValues}}allowableValues="{{#values}}{{{.}}}{{^@last}}, {{/@last}}{{/values}}{{^values}}range=[{{#min}}{{.}}{{/min}}{{^min}}-infinity{{/min}}, {{#max}}{{.}}{{/max}}{{^max}}infinity{{/max}}]{{/values}}"{{/allowableValues}} 3 | {{/useOas2}} 4 | {{^useOas2}} 5 | {{#allowableValues}}allowableValues={ {{#values}}"{{{.}}}"{{^@last}}, {{/@last}}{{/values}}{{^values}}{{/values}} }{{#min}}, minimum="{{.}}"{{/min}}{{#max}}, maximum="{{.}}"{{/max}}{{/allowableValues}} 6 | {{/useOas2}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaSpring/libraries/spring-boot3/homeController.mustache: -------------------------------------------------------------------------------- 1 | package {{configPackage}}; 2 | 3 | import org.springframework.stereotype.Controller; 4 | import org.springframework.web.bind.annotation.RequestMapping; 5 | 6 | /** 7 | * Home redirection to swagger api documentation 8 | */ 9 | @Controller 10 | public class HomeController { 11 | @RequestMapping(value = "/") 12 | public String index() { 13 | System.out.println("/swagger-ui/index.html"); 14 | return "redirect:/swagger-ui/"; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/pythonFlaskConnexion/__init__test.mustache: -------------------------------------------------------------------------------- 1 | import logging 2 | 3 | import connexion 4 | from flask_testing import TestCase 5 | 6 | from {{packageName}}.encoder import JSONEncoder 7 | 8 | 9 | class BaseTestCase(TestCase): 10 | 11 | def create_app(self): 12 | logging.getLogger('connexion.operation').setLevel('ERROR') 13 | app = connexion.App(__name__, specification_dir='../swagger/') 14 | app.app.json_encoder = JSONEncoder 15 | app.add_api('swagger.yaml') 16 | return app.app 17 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/beanValidation.mustache: -------------------------------------------------------------------------------- 1 | {{#required}}{{^useNullableForNotNull}} 2 | @NotNull 3 | {{/useNullableForNotNull}}{{/required}} 4 | {{#useNullableForNotNull}}{{^nullable}} 5 | @NotNull 6 | {{/nullable}}{{/useNullableForNotNull}} 7 | {{#is this 'container'}} 8 | {{#isNot this 'primitive-type'}} 9 | {{#isNot this 'enum'}} 10 | @Valid 11 | {{/isNot}} 12 | {{/isNot}} 13 | {{/is}} 14 | {{#isNot this 'container'}} 15 | {{#isNot this 'primitive-type'}} 16 | @Valid 17 | {{/isNot}} 18 | {{/isNot}} 19 | {{>beanValidationCore}} 20 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/go-server/main.mustache: -------------------------------------------------------------------------------- 1 | {{>partial_header}} 2 | package main 3 | 4 | import ( 5 | "log" 6 | "net/http" 7 | 8 | // WARNING! 9 | // Change this to a fully-qualified import path 10 | // once you place this file into your project. 11 | // For example, 12 | // 13 | // sw "github.com/myname/myrepo/{{apiPath}}" 14 | // 15 | sw "./{{apiPath}}" 16 | ) 17 | 18 | func main() { 19 | log.Printf("Server started") 20 | 21 | router := sw.NewRouter() 22 | 23 | log.Fatal(http.ListenAndServe(":{{serverPort}}", router)) 24 | } 25 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/kotlin-server/libraries/ktor/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | %d{YYYY-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/swagger-static/model.mustache: -------------------------------------------------------------------------------- 1 | {{#models}} 2 | {{#model}} 3 | 4 |

{{classname}}

5 | {{#vars}} 6 |
    7 |
  • {{name}} : {{datatype}} 8 |
    {{description}} 9 | {{#is this 'enum'}} 10 |
    11 |
    Enum: 12 | {{#_enum}} 13 |
    {{this}}
    14 | {{/_enum}} 15 | 16 |
    17 | {{/is}} 18 |
  • 19 |
20 | {{/vars}} 21 | {{/model}} 22 | {{/models}} 23 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/cxf-cdi/bodyParams.mustache: -------------------------------------------------------------------------------- 1 | {{#is this 'body-param'}} 2 | {{#useOas2}}@ApiParam(value = "{{{description}}}" {{#required}},required=true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}) {{{dataType}}} {{paramName}}{{/useOas2}} 3 | {{^useOas2}}@Parameter(description = "{{{description}}}" {{#required}},required=true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}) {{{dataType}}} {{paramName}}{{/useOas2}} 4 | {{/is}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/resteasy/bodyParams.mustache: -------------------------------------------------------------------------------- 1 | {{#is this 'body-param'}} 2 | {{#useOas2}}@ApiParam(value = "{{{description}}}" {{#required}},required=true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}) {{{dataType}}} {{paramName}}{{/useOas2}} 3 | {{^useOas2}}@Parameter(description = "{{{description}}}" {{#required}},required=true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}) {{{dataType}}} {{paramName}}{{/useOas2}} 4 | {{/is}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/htmlDocs/bodyParam.mustache: -------------------------------------------------------------------------------- 1 | {{#is this 'body-param'}}
{{baseName}} {{#baseType}}{{baseType}}{{/baseType}} {{^required}}(optional){{/required}}{{#required}}(required){{/required}}
2 | 3 |
Body Parameter — {{unescapedDescription}} {{#defaultValue}}default: {{{defaultValue}}}{{/defaultValue}}
{{/is}} 4 | {{#example}}
example: {{example}}
{{/example}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/swift5/model.mustache: -------------------------------------------------------------------------------- 1 | {{#models}}{{#model}}// 2 | // {{classname}}.swift 3 | // 4 | // Generated by swagger-codegen 5 | // https://github.com/swagger-api/swagger-codegen 6 | // 7 | 8 | import Foundation 9 | 10 | {{#description}} 11 | 12 | /** {{description}} */{{/description}} 13 | {{#isArrayModel}} 14 | {{> modelArray}} 15 | {{/isArrayModel}} 16 | {{^isArrayModel}} 17 | {{#isEnum}} 18 | {{> modelEnum}} 19 | {{/isEnum}} 20 | {{^isEnum}} 21 | {{> modelObject}} 22 | {{/isEnum}} 23 | {{/isArrayModel}} 24 | {{/model}} 25 | {{/models}} 26 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/Java/libraries/retrofit2/formParams.mustache: -------------------------------------------------------------------------------- 1 | {{#is this 'form-param'}}{{#isNot this 'binary'}}{{#is this 'multipart'}}@retrofit2.http.Part{{/is}}{{#isNot this 'multipart'}}@retrofit2.http.Field{{/isNot}}("{{baseName}}") {{{dataType}}} {{paramName}}{{/isNot}}{{#is this 'binary'}}{{#is this 'multipart'}}@retrofit2.http.Part{{/is}}{{#isNot this 'multipart'}}@retrofit2.http.Field{{/isNot}}{{#usePlayWS}} okhttp3.MultipartBody.Part {{/usePlayWS}}{{^usePlayWS}}("{{baseName}}\"; filename=\"{{baseName}}") RequestBody {{/usePlayWS}}{{paramName}}{{/is}}{{/is}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/allowableValues.mustache: -------------------------------------------------------------------------------- 1 | {{#useOas2}} 2 | {{#allowableValues}}allowableValues="{{#values}}{{{.}}}{{^@last}}, {{/@last}}{{/values}}{{^values}}range=[{{#min}}{{.}}{{/min}}{{^min}}-infinity{{/min}}, {{#max}}{{.}}{{/max}}{{^max}}infinity{{/max}}]{{/values}}"{{/allowableValues}} 3 | {{/useOas2}} 4 | {{^useOas2}} 5 | {{#allowableValues}}schema=@Schema(allowableValues={ {{#values}}"{{{.}}}"{{^@last}}, {{/@last}}{{/values}}{{^values}}{{/values}} }{{#min}}, minimum="{{.}}"{{/min}}{{#max}}, maximum="{{.}}"{{/max}}){{/allowableValues}} 6 | {{/useOas2}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/aspnetcore/formParam.mustache: -------------------------------------------------------------------------------- 1 | {{#isFormParam}}[FromForm]{{#required}}[Required()]{{/required}}{{#pattern}}[RegularExpression("{{{pattern}}}")]{{/pattern}}{{#minLength}}{{#maxLength}}[StringLength({{maxLength}}, MinimumLength={{minLength}}){{/maxLength}}{{/minLength}}{{#minLength}}{{^maxLength}} [MinLength({{minLength}})]{{/maxLength}}{{/minLength}}{{^minLength}}{{#maxLength}} [MaxLength({{maxLength}})]{{/maxLength}}{{/minLength}}{{#minimum}}{{#maximum}}[Range({{minimum}}, {{maximum}})]{{/maximum}}{{/minimum}}{{&dataType}} {{paramName}}{{/isFormParam}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/aspnetcore/pathParam.mustache: -------------------------------------------------------------------------------- 1 | {{#isPathParam}}[FromRoute]{{#required}}[Required]{{/required}}{{#pattern}}[RegularExpression("{{{pattern}}}")]{{/pattern}}{{#minLength}}{{#maxLength}}[StringLength({{maxLength}}, MinimumLength={{minLength}}){{/maxLength}}{{/minLength}}{{#minLength}}{{^maxLength}} [MinLength({{minLength}})]{{/maxLength}}{{/minLength}}{{^minLength}}{{#maxLength}} [MaxLength({{maxLength}})]{{/maxLength}}{{/minLength}}{{#minimum}}{{#maximum}}[Range({{minimum}}, {{maximum}})]{{/maximum}}{{/minimum}}{{&dataType}} {{paramName}}{{/isPathParam}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/cxf/allowableValues.mustache: -------------------------------------------------------------------------------- 1 | {{#useOas2}} 2 | {{#allowableValues}}allowableValues="{{#values}}{{{.}}}{{^@last}}, {{/@last}}{{/values}}{{^values}}range=[{{#min}}{{.}}{{/min}}{{^min}}-infinity{{/min}}, {{#max}}{{.}}{{/max}}{{^max}}infinity{{/max}}]{{/values}}"{{/allowableValues}} 3 | {{/useOas2}} 4 | {{^useOas2}} 5 | {{#allowableValues}}schema=@Schema(allowableValues={ {{#values}}"{{{.}}}"{{^@last}}, {{/@last}}{{/values}}{{^values}}{{/values}} }{{#min}}, minimum="{{.}}"{{/min}}{{#max}}, maximum="{{.}}"{{/max}}){{/allowableValues}} 6 | {{/useOas2}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/spec/allowableValues.mustache: -------------------------------------------------------------------------------- 1 | {{#useOas2}} 2 | {{#allowableValues}}allowableValues="{{#values}}{{{.}}}{{^@last}}, {{/@last}}{{/values}}{{^values}}range=[{{#min}}{{.}}{{/min}}{{^min}}-infinity{{/min}}, {{#max}}{{.}}{{/max}}{{^max}}infinity{{/max}}]{{/values}}"{{/allowableValues}} 3 | {{/useOas2}} 4 | {{^useOas2}} 5 | {{#allowableValues}}schema=@Schema(allowableValues={ {{#values}}"{{{.}}}"{{^@last}}, {{/@last}}{{/values}}{{^values}}{{/values}} }{{#min}}, minimum="{{.}}"{{/min}}{{#max}}, maximum="{{.}}"{{/max}}){{/allowableValues}} 6 | {{/useOas2}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/aspnetcore/Dockerfile.mustache: -------------------------------------------------------------------------------- 1 | FROM microsoft/aspnetcore-build:{{aspNetCoreVersion}} AS build-env 2 | WORKDIR /app 3 | 4 | ENV DOTNET_CLI_TELEMETRY_OPTOUT 1 5 | 6 | # copy csproj and restore as distinct layers 7 | COPY *.csproj ./ 8 | RUN dotnet restore 9 | 10 | # copy everything else and build 11 | COPY . ./ 12 | RUN dotnet publish -c Release -o out 13 | 14 | # build runtime image 15 | FROM microsoft/aspnetcore:{{aspNetCoreVersion}} 16 | WORKDIR /app 17 | COPY --from=build-env /app/out . 18 | ENTRYPOINT ["dotnet", "{{packageName}}.dll"] 19 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/aspnetcore/queryParam.mustache: -------------------------------------------------------------------------------- 1 | {{#isQueryParam}}[FromQuery]{{#required}}[Required()]{{/required}}{{#pattern}}[RegularExpression("{{{pattern}}}")]{{/pattern}}{{#minLength}}{{#maxLength}}[StringLength({{maxLength}}, MinimumLength={{minLength}}){{/maxLength}}{{/minLength}}{{#minLength}}{{^maxLength}} [MinLength({{minLength}})]{{/maxLength}}{{/minLength}}{{^minLength}}{{#maxLength}} [MaxLength({{maxLength}})]{{/maxLength}}{{/minLength}}{{#minimum}}{{#maximum}}[Range({{minimum}}, {{maximum}})]{{/maximum}}{{/minimum}}{{&dataType}} {{paramName}}{{/isQueryParam}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/javascript/enumClass.mustache: -------------------------------------------------------------------------------- 1 | {{#emitJSDoc}} 2 | /** 3 | * Allowed values for the {{baseName}} property. 4 | * @enum {{braces "left"}}{{datatype}}{{braces "right"}} 5 | * @readonly 6 | */ 7 | {{/emitJSDoc}} 8 | exports.{{datatypeWithEnum}} = { 9 | {{#allowableValues}} 10 | {{#enumVars}} 11 | {{#emitJSDoc}} 12 | /** 13 | * value: {{{value}}} 14 | * @const 15 | */ 16 | {{/emitJSDoc}} 17 | "{{name}}": {{{value}}}{{^@last}}, 18 | {{/@last}} 19 | {{/enumVars}} 20 | {{/allowableValues}} 21 | }; 22 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/Java/auth/Authentication.mustache: -------------------------------------------------------------------------------- 1 | {{>licenseInfo}} 2 | 3 | package {{invokerPackage}}.auth; 4 | 5 | import {{invokerPackage}}.Pair; 6 | 7 | import java.util.Map; 8 | import java.util.List; 9 | 10 | public interface Authentication { 11 | /** 12 | * Apply authentication settings to header and query params. 13 | * 14 | * @param queryParams List of query parameters 15 | * @param headerParams Map of header parameters 16 | */ 17 | void applyToParams(List queryParams, Map headerParams); 18 | } 19 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/Java/typeInfoAnnotation.mustache: -------------------------------------------------------------------------------- 1 | {{#jackson}} 2 | @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "{{discriminator.propertyName}}", visible = true ) 3 | @JsonSubTypes({ 4 | {{#children}} 5 | @JsonSubTypes.Type(value = {{classname}}.class, name = "{{^vendorExtensions.x-discriminator-value}}{{subtypeName}}{{/vendorExtensions.x-discriminator-value}}{{#vendorExtensions.x-discriminator-value}}{{{vendorExtensions.x-discriminator-value}}}{{/vendorExtensions.x-discriminator-value}}"), 6 | {{/children}} 7 | }) 8 | {{/jackson}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/cxf-cdi/allowableValues.mustache: -------------------------------------------------------------------------------- 1 | {{#useOas2}} 2 | {{#allowableValues}}allowableValues="{{#values}}{{{.}}}{{^@last}}, {{/@last}}{{/values}}{{^values}}range=[{{#min}}{{.}}{{/min}}{{^min}}-infinity{{/min}}, {{#max}}{{.}}{{/max}}{{^max}}infinity{{/max}}]{{/values}}"{{/allowableValues}} 3 | {{/useOas2}} 4 | {{^useOas2}} 5 | {{#allowableValues}}schema=@Schema(allowableValues={ {{#values}}"{{{.}}}"{{^@last}}, {{/@last}}{{/values}}{{^values}}{{/values}} }{{#min}}, minimum="{{.}}"{{/min}}{{#max}}, maximum="{{.}}"{{/max}}){{/allowableValues}} 6 | {{/useOas2}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/resteasy/allowableValues.mustache: -------------------------------------------------------------------------------- 1 | {{#useOas2}} 2 | {{#allowableValues}}allowableValues="{{#values}}{{{.}}}{{^@last}}, {{/@last}}{{/values}}{{^values}}range=[{{#min}}{{.}}{{/min}}{{^min}}-infinity{{/min}}, {{#max}}{{.}}{{/max}}{{^max}}infinity{{/max}}]{{/values}}"{{/allowableValues}} 3 | {{/useOas2}} 4 | {{^useOas2}} 5 | {{#allowableValues}}schema=@Schema(allowableValues={ {{#values}}"{{{.}}}"{{^@last}}, {{/@last}}{{/values}}{{^values}}{{/values}} }{{#min}}, minimum="{{.}}"{{/min}}{{#max}}, maximum="{{.}}"{{/max}}){{/allowableValues}} 6 | {{/useOas2}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/resteasy/cookieParams.mustache: -------------------------------------------------------------------------------- 1 | {{#isCookieParam}} 2 | {{#useOas2}}@ApiParam(value = "{{{description}}}" {{#required}},required=true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}) {{{dataType}}} {{paramName}}{{/useOas2}} 3 | {{^useOas2}}@Parameter(description = "{{{description}}}" {{#required}},required=true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}) {{{dataType}}} {{paramName}}{{/useOas2}} 4 | {{/isCookieParam}} 5 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/resteasy/eap/cookieParams.mustache: -------------------------------------------------------------------------------- 1 | {{#isCookieParam}} 2 | {{#useOas2}}@ApiParam(value = "{{{description}}}" {{#required}},required=true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}) {{{dataType}}} {{paramName}}{{/useOas2}} 3 | {{^useOas2}}@Parameter(description = "{{{description}}}" {{#required}},required=true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}) {{{dataType}}} {{paramName}}{{/useOas2}} 4 | {{/isCookieParam}} 5 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaSpring/libraries/spring-mvc/webMvcConfiguration.mustache: -------------------------------------------------------------------------------- 1 | package {{configPackage}}; 2 | 3 | import org.springframework.web.servlet.config.annotation.DefaultServletHandlerConfigurer; 4 | import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport; 5 | 6 | {{>generatedAnnotation}} 7 | public class WebMvcConfiguration extends WebMvcConfigurationSupport { 8 | @Override 9 | public void configureDefaultServletHandling(DefaultServletHandlerConfigurer configurer) { 10 | configurer.enable(); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/aspnetcore/headerParam.mustache: -------------------------------------------------------------------------------- 1 | {{#isHeaderParam}}[FromHeader]{{#required}}[Required()]{{/required}}{{#pattern}}[RegularExpression("{{{pattern}}}")]{{/pattern}}{{#minLength}}{{#maxLength}}[StringLength({{maxLength}}, MinimumLength={{minLength}}){{/maxLength}}{{/minLength}}{{#minLength}}{{^maxLength}} [MinLength({{minLength}})]{{/maxLength}}{{/minLength}}{{^minLength}}{{#maxLength}} [MaxLength({{maxLength}})]{{/maxLength}}{{/minLength}}{{#minimum}}{{#maximum}}[Range({{minimum}}, {{maximum}})]{{/maximum}}{{/minimum}}{{&dataType}} {{paramName}}{{/isHeaderParam}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/resteasy/eap/allowableValues.mustache: -------------------------------------------------------------------------------- 1 | {{#useOas2}} 2 | {{#allowableValues}}allowableValues="{{#values}}{{{.}}}{{^@last}}, {{/@last}}{{/values}}{{^values}}range=[{{#min}}{{.}}{{/min}}{{^min}}-infinity{{/min}}, {{#max}}{{.}}{{/max}}{{^max}}infinity{{/max}}]{{/values}}"{{/allowableValues}} 3 | {{/useOas2}} 4 | {{^useOas2}} 5 | {{#allowableValues}}schema=@Schema(allowableValues={ {{#values}}"{{{.}}}"{{^@last}}, {{/@last}}{{/values}}{{^values}}{{/values}} }{{#min}}, minimum="{{.}}"{{/min}}{{#max}}, maximum="{{.}}"{{/max}}){{/allowableValues}} 6 | {{/useOas2}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/resteasy/eap/web.mustache: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | resteasy.providers 7 | {{invokerPackage}}.JacksonConfig 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/typescript-angular/modelGenericEnums.mustache: -------------------------------------------------------------------------------- 1 | {{#has this 'enums'}} 2 | 3 | export namespace {{classname}} { 4 | {{#vars}} 5 | {{#is this 'enum'}} 6 | export type {{enumName}} = {{#allowableValues}}{{#enumVars}}{{{value}}}{{^@last}} | {{/@last}}{{/enumVars}}{{/allowableValues}}; 7 | export const {{enumName}} = { 8 | {{#allowableValues}} 9 | {{#enumVars}} 10 | {{name}}: {{{value}}} as {{enumName}}{{^@last}},{{/@last}} 11 | {{/enumVars}} 12 | {{/allowableValues}} 13 | }; 14 | {{/is}} 15 | {{/vars}} 16 | }{{/has}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaSpring/TestUtils.mustache: -------------------------------------------------------------------------------- 1 | package {{basePackage}}; 2 | 3 | import java.util.Random; 4 | import java.util.concurrent.atomic.AtomicLong; 5 | 6 | public class TestUtils { 7 | private static final AtomicLong atomicId = createAtomicId(); 8 | 9 | public static long nextId() { 10 | return atomicId.getAndIncrement(); 11 | } 12 | 13 | private static AtomicLong createAtomicId() { 14 | int baseId = new Random(System.currentTimeMillis()).nextInt(1000000) + 20000; 15 | return new AtomicLong((long) baseId); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaSpring/typeInfoAnnotation.mustache: -------------------------------------------------------------------------------- 1 | {{#jackson}} 2 | @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "{{discriminator.propertyName}}", visible = true ) 3 | @JsonSubTypes({ 4 | {{#if discriminator.mapping}} 5 | {{#each discriminator.mapping}} 6 | @JsonSubTypes.Type(value = {{this}}.class, name = "{{@key}}"), 7 | {{/each}} 8 | {{else}} 9 | {{#children}} 10 | @JsonSubTypes.Type(value = {{classname}}.class, name = "{{name}}"), 11 | {{/children}} 12 | {{/if}} 13 | }) 14 | {{/jackson}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/javascript/es6/enumClass.mustache: -------------------------------------------------------------------------------- 1 | {{#emitJSDoc}} /** 2 | * Allowed values for the {{baseName}} property. 3 | * @enum {{braces "left"}}{{datatype}}{{braces "right"}} 4 | * @readonly 5 | */{{/emitJSDoc}} 6 | export default {{datatypeWithEnum}} = { 7 | {{#allowableValues}} 8 | {{#enumVars}} 9 | {{#emitJSDoc}} 10 | /** 11 | * value: {{{value}}} 12 | * @const 13 | */ 14 | {{/emitJSDoc}} 15 | "{{name}}": {{{value}}}{{^@last}}, 16 | {{/@last}} 17 | {{/enumVars}} 18 | {{/allowableValues}} 19 | }; 20 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/typescript-angular/model.mustache: -------------------------------------------------------------------------------- 1 | {{>licenseInfo}} 2 | {{#models}} 3 | {{#model}} 4 | 5 | {{#tsImports}} 6 | import { {{classname}} } from './{{filename}}'; 7 | {{/tsImports}} 8 | 9 | {{#description}} 10 | /** 11 | * {{{description}}} 12 | */ 13 | {{/description}} 14 | {{#is this 'enum'}}{{>modelEnum}}{{/is}}{{#isNot this 'enum'}}{{#is this 'alias'}}{{>modelAlias}}{{/is}}{{#isNot this 'alias'}}{{#taggedUnions}}{{>modelTaggedUnion}}{{/taggedUnions}}{{^taggedUnions}}{{>modelGeneric}}{{/taggedUnions}}{{/isNot}}{{/isNot}} 15 | {{/model}} 16 | {{/models}} 17 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/cookieParams.mustache: -------------------------------------------------------------------------------- 1 | {{#isCookieParam}} 2 | {{#useOas2}}@ApiParam(value = "{{{description}}}" {{#required}},required=true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}) {{{dataType}}} {{paramName}}{{/useOas2}} 3 | {{^useOas2}}@Parameter(in = ParameterIn.COOKIE, description = "{{{description}}}" {{#required}},required=true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}) {{{dataType}}} {{paramName}}{{/useOas2}} 4 | {{/isCookieParam}} 5 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/typeInfoAnnotation.mustache: -------------------------------------------------------------------------------- 1 | {{#jackson}} 2 | @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "{{discriminator.propertyName}}", visible = true ) 3 | @JsonSubTypes({ 4 | {{#if discriminator.mapping}} 5 | {{#each discriminator.mapping}} 6 | @JsonSubTypes.Type(value = {{this}}.class, name = "{{@key}}"), 7 | {{/each}} 8 | {{else}} 9 | {{#children}} 10 | @JsonSubTypes.Type(value = {{classname}}.class, name = "{{name}}"), 11 | {{/children}} 12 | {{/if}} 13 | }) 14 | {{/jackson}} 15 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaSpring/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.8.4") 2 | 3 | libraryDependencies <+= sbtVersion(v => v match { 4 | case "0.11.0" => "com.github.siasia" %% "xsbt-web-plugin" % "0.11.0-0.2.8" 5 | case "0.11.1" => "com.github.siasia" %% "xsbt-web-plugin" % "0.11.1-0.2.10" 6 | case "0.11.2" => "com.github.siasia" %% "xsbt-web-plugin" % "0.11.2-0.2.11" 7 | case "0.11.3" => "com.github.siasia" %% "xsbt-web-plugin" % "0.11.3-0.2.11.1" 8 | case x if (x.startsWith("0.12")) => "com.github.siasia" %% "xsbt-web-plugin" % "0.12.0-0.2.11.1" 9 | }) -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaVertXServer/typeInfoAnnotation.mustache: -------------------------------------------------------------------------------- 1 | {{#jackson}} 2 | @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "{{discriminator.propertyName}}", visible = true ) 3 | @JsonSubTypes({ 4 | {{#if discriminator.mapping}} 5 | {{#each discriminator.mapping}} 6 | @JsonSubTypes.Type(value = {{this}}.class, name = "{{@key}}"), 7 | {{/each}} 8 | {{else}} 9 | {{#children}} 10 | @JsonSubTypes.Type(value = {{classname}}.class, name = "{{name}}"), 11 | {{/children}} 12 | {{/if}} 13 | }) 14 | {{/jackson}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/javascript/es6/partial_model_inner_enum.mustache: -------------------------------------------------------------------------------- 1 | {{#emitJSDoc}} 2 | /** 3 | * Allowed values for the {{name}} property. 4 | * @enum {{braces "left"}}{{datatype}}{{braces "right"}} 5 | * @readonly 6 | */ 7 | {{/emitJSDoc}} 8 | {{classname}}.{{datatypeWithEnum}} = { 9 | {{#allowableValues}} 10 | {{#enumVars}} 11 | {{#emitJSDoc}} 12 | /** 13 | * value: {{{value}}} 14 | * @const 15 | */ 16 | {{/emitJSDoc}} 17 | {{name}}: {{{value}}}{{^@last}}, 18 | 19 | {{/@last}} 20 | {{/enumVars}} 21 | {{/allowableValues}} 22 | 23 | }; 24 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/python/__init__package.mustache: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | # flake8: noqa 4 | 5 | {{>partial_header}} 6 | 7 | from __future__ import absolute_import 8 | 9 | # import apis into sdk package 10 | {{#apiInfo}}{{#apis}}from {{importPath}} import {{classname}} 11 | {{/apis}}{{/apiInfo}} 12 | # import ApiClient 13 | from {{packageName}}.api_client import ApiClient 14 | from {{packageName}}.configuration import Configuration 15 | # import models into sdk package 16 | {{#models}}{{#model}}from {{modelPackage}}.{{classFilename}} import {{classname}} 17 | {{/model}}{{/models}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/ruby/model_doc.mustache: -------------------------------------------------------------------------------- 1 | {{#models}}{{#model}}# {{moduleName}}::{{classname}} 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | {{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{datatype}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{datatype}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}} 7 | {{/vars}} 8 | 9 | {{/model}}{{/models}} 10 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/typescript-axios/tsconfig.mustache: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "declaration": true, 4 | "target": "{{#supportsES6}}es6{{/supportsES6}}{{^supportsES6}}es5{{/supportsES6}}", 5 | "module": "commonjs", 6 | "noImplicitAny": true, 7 | "outDir": "dist", 8 | "rootDir": ".", 9 | {{^supportsES6}} 10 | "lib": [ 11 | "es6", 12 | "dom" 13 | ], 14 | {{/supportsES6}} 15 | "typeRoots": [ 16 | "node_modules/@types" 17 | ] 18 | }, 19 | "exclude": [ 20 | "dist", 21 | "node_modules" 22 | ] 23 | } 24 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaInflector/typeInfoAnnotation.mustache: -------------------------------------------------------------------------------- 1 | {{#jackson}} 2 | @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "{{discriminator.propertyName}}", visible = true ) 3 | @JsonSubTypes({ 4 | {{#if discriminator.mapping}} 5 | {{#each discriminator.mapping}} 6 | @JsonSubTypes.Type(value = {{this}}.class, name = "{{@key}}"), 7 | {{/each}} 8 | {{else}} 9 | {{#children}} 10 | @JsonSubTypes.Type(value = {{classname}}.class, name = "{{name}}"), 11 | {{/children}} 12 | {{/if}} 13 | }) 14 | {{/jackson}} 15 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaMicronaut/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.8.4") 2 | 3 | libraryDependencies <+= sbtVersion(v => v match { 4 | case "0.11.0" => "com.github.siasia" %% "xsbt-web-plugin" % "0.11.0-0.2.8" 5 | case "0.11.1" => "com.github.siasia" %% "xsbt-web-plugin" % "0.11.1-0.2.10" 6 | case "0.11.2" => "com.github.siasia" %% "xsbt-web-plugin" % "0.11.2-0.2.11" 7 | case "0.11.3" => "com.github.siasia" %% "xsbt-web-plugin" % "0.11.3-0.2.11.1" 8 | case x if (x.startsWith("0.12")) => "com.github.siasia" %% "xsbt-web-plugin" % "0.12.0-0.2.11.1" 9 | }) -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaMicronaut/typeInfoAnnotation.mustache: -------------------------------------------------------------------------------- 1 | {{#jackson}} 2 | @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "{{discriminator.propertyName}}", visible = true ) 3 | @JsonSubTypes({ 4 | {{#if discriminator.mapping}} 5 | {{#each discriminator.mapping}} 6 | @JsonSubTypes.Type(value = {{this}}.class, name = "{{@key}}"), 7 | {{/each}} 8 | {{else}} 9 | {{#children}} 10 | @JsonSubTypes.Type(value = {{classname}}.class, name = "{{name}}"), 11 | {{/children}} 12 | {{/if}} 13 | }) 14 | {{/jackson}} 15 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/aspnetcore/2.1/Dockerfile.mustache: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/dotnet/core/sdk:{{aspNetCoreVersion}} AS build-env 2 | WORKDIR /app 3 | 4 | ENV DOTNET_CLI_TELEMETRY_OPTOUT 1 5 | 6 | # copy csproj and restore as distinct layers 7 | COPY *.csproj ./ 8 | RUN dotnet restore 9 | 10 | # copy everything else and build 11 | COPY . ./ 12 | RUN dotnet publish -c Release -o out 13 | 14 | # build runtime image 15 | FROM mcr.microsoft.com/dotnet/core/aspnet:{{aspNetCoreVersion}} 16 | WORKDIR /app 17 | COPY --from=build-env /app/out . 18 | ENTRYPOINT ["dotnet", "{{packageName}}.dll"] 19 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/javascript/partial_model_inner_enum.mustache: -------------------------------------------------------------------------------- 1 | {{#emitJSDoc}}/** 2 | * Allowed values for the {{baseName}} property. 3 | * @enum {{braces "left"}}{{datatype}}{{braces "right"}} 4 | * @readonly 5 | */{{/emitJSDoc}} 6 | static {{datatypeWithEnum}} = { 7 | {{#allowableValues}}{{#enumVars}} 8 | {{#emitJSDoc}}/** 9 | * value: {{{value}}} 10 | * @const 11 | */{{/emitJSDoc}} 12 | "{{name}}": {{{value}}}{{^@last}}, 13 | {{/@last}} 14 | {{/enumVars}}{{/allowableValues}} 15 | }; 16 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/bodyParams.mustache: -------------------------------------------------------------------------------- 1 | {{#is this 'body-param'}} 2 | {{#useOas2}} 3 | @ApiParam(value = "{{{description}}}" {{#required}},required=true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}) {{{dataType}}} {{paramName}} 4 | {{/useOas2}} 5 | {{^useOas2}} 6 | @Parameter(in = ParameterIn.DEFAULT, description = "{{{description}}}" {{#required}},required=true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}) {{{dataType}}} {{paramName}} 7 | {{/useOas2}} 8 | {{/is}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/resteasy/headerParams.mustache: -------------------------------------------------------------------------------- 1 | {{#is this 'header-param'}}{{#useOas2}}@ApiParam(value = "{{{description}}}" {{#required}},required=true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}})@HeaderParam("{{baseName}}") {{{dataType}}} {{paramName}}{{/useOas2}}{{^useOas2}}@Parameter(description = "{{{description}}}" {{#required}},required=true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}})@HeaderParam("{{baseName}}") {{{dataType}}} {{paramName}}{{/useOas2}}{{/is}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaMicronaut/application.mustache: -------------------------------------------------------------------------------- 1 | micronaut: 2 | application: 3 | name: {{artifactId}} 4 | router: 5 | static-resources: 6 | swagger: 7 | paths: classpath:META-INF/swagger 8 | mapping: /swagger/** 9 | server: 10 | cors: 11 | enabled: true 12 | configurations: 13 | web: 14 | allowedOrigins: * 15 | allowedMethods: 16 | - GET 17 | - POST 18 | - DELETE 19 | - PUT 20 | allowedHeaders: 21 | - Content-Type 22 | - Authorization -------------------------------------------------------------------------------- /src/main/resources/handlebars/aspnetcore/3.0/Dockerfile.mustache: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/dotnet/core/sdk:{{aspNetCoreVersion}} AS build-env 2 | WORKDIR /app 3 | 4 | ENV DOTNET_CLI_TELEMETRY_OPTOUT 1 5 | 6 | # copy csproj and restore as distinct layers 7 | COPY *.csproj ./ 8 | RUN dotnet restore 9 | 10 | # copy everything else and build 11 | COPY . ./ 12 | RUN dotnet publish -c Release -o out 13 | 14 | # build runtime image 15 | FROM mcr.microsoft.com/dotnet/core/aspnet:{{aspNetCoreVersion}} 16 | WORKDIR /app 17 | COPY --from=build-env /app/out . 18 | 19 | ENTRYPOINT ["dotnet", "{{packageName}}.dll"] 20 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/go-server/logger.mustache: -------------------------------------------------------------------------------- 1 | {{>partial_header}} 2 | package {{packageName}} 3 | 4 | import ( 5 | "log" 6 | "net/http" 7 | "time" 8 | ) 9 | 10 | func Logger(inner http.Handler, name string) http.Handler { 11 | return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { 12 | start := time.Now() 13 | 14 | inner.ServeHTTP(w, r) 15 | 16 | log.Printf( 17 | "%s %s %s %s", 18 | r.Method, 19 | r.RequestURI, 20 | name, 21 | time.Since(start), 22 | ) 23 | }) 24 | } 25 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/libraries/jersey1/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.8.4") 2 | 3 | libraryDependencies <+= sbtVersion(v => v match { 4 | case "0.11.0" => "com.github.siasia" %% "xsbt-web-plugin" % "0.11.0-0.2.8" 5 | case "0.11.1" => "com.github.siasia" %% "xsbt-web-plugin" % "0.11.1-0.2.10" 6 | case "0.11.2" => "com.github.siasia" %% "xsbt-web-plugin" % "0.11.2-0.2.11" 7 | case "0.11.3" => "com.github.siasia" %% "xsbt-web-plugin" % "0.11.3-0.2.11.1" 8 | case x if (x.startsWith("0.12")) => "com.github.siasia" %% "xsbt-web-plugin" % "0.12.0-0.2.11.1" 9 | }) -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/resteasy/eap/headerParams.mustache: -------------------------------------------------------------------------------- 1 | {{#is this 'header-param'}}{{#useOas2}}@ApiParam(value = "{{{description}}}" {{#required}},required=true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}})@HeaderParam("{{baseName}}") {{{dataType}}} {{paramName}}{{/useOas2}}{{^useOas2}}@Parameter(description = "{{{description}}}" {{#required}},required=true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}})@HeaderParam("{{baseName}}") {{{dataType}}} {{paramName}}{{/useOas2}}{{/is}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/csharp-dotnet2/compile-mono.sh.mustache: -------------------------------------------------------------------------------- 1 | curl --location --request GET 'https://dist.nuget.org/win-x86-commandline/latest/nuget.exe' --output './nuget.exe' 2 | mozroots --import --sync 3 | mono nuget.exe install vendor/packages.config -o vendor; 4 | mkdir -p bin; 5 | mcs -sdk:2 -r:vendor/Newtonsoft.Json.7.0.1/lib/net20/Newtonsoft.Json.dll,\ 6 | vendor/RestSharp.Net2.1.1.11/lib/net20/RestSharp.Net2.dll,\ 7 | System.Runtime.Serialization.dll \ 8 | -target:library \ 9 | -out:bin/{{packageName}}.dll \ 10 | -recurse:'src/*.cs' \ 11 | -doc:bin/{{packageName}}.xml \ 12 | -platform:anycpu 13 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/Java/libraries/resttemplate/auth/Authentication.mustache: -------------------------------------------------------------------------------- 1 | package {{invokerPackage}}.auth; 2 | 3 | import org.springframework.http.HttpHeaders; 4 | import org.springframework.util.MultiValueMap; 5 | 6 | public interface Authentication { 7 | /** 8 | * Apply authentication settings to header and / or query parameters. 9 | * @param queryParams The query parameters for the request 10 | * @param headerParams The header parameters for the request 11 | */ 12 | public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams); 13 | } 14 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/pathParams.mustache: -------------------------------------------------------------------------------- 1 | {{~#is this 'path-param'}}{{#useOas2}}@ApiParam(value = "{{{description}}}"{{#required}},required=true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}) @PathParam("{{baseName}}") {{{dataType}}} {{paramName}}{{/useOas2}}{{^useOas2}}@Parameter(in = ParameterIn.PATH, description = "{{{description}}}"{{#required}},required=true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}) @PathParam("{{baseName}}") {{{dataType}}} {{paramName}}{{/useOas2}}{{/is}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/Java/libraries/feign/ParamExpander.mustache: -------------------------------------------------------------------------------- 1 | package {{invokerPackage}}; 2 | 3 | import feign.Param; 4 | 5 | import java.text.DateFormat; 6 | import java.util.Date; 7 | 8 | /** 9 | * Param Expander to convert {@link Date} to RFC3339 10 | */ 11 | public class ParamExpander implements Param.Expander { 12 | 13 | private static final DateFormat dateformat = new RFC3339DateFormat(); 14 | 15 | @Override 16 | public String expand(Object value) { 17 | if (value instanceof Date) { 18 | return dateformat.format(value); 19 | } 20 | return value.toString(); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/cxf-cdi/headerParams.mustache: -------------------------------------------------------------------------------- 1 | {{#is this 'header-param'}} 2 | {{#useOas2}}@ApiParam(value = "{{{description}}}" {{#required}},required=true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}})@HeaderParam("{{baseName}}") {{{dataType}}} {{paramName}}{{/useOas2}} 3 | {{^useOas2}}@Parameter(description = "{{{description}}}" {{#required}},required=true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}})@HeaderParam("{{baseName}}") {{{dataType}}} {{paramName}}{{/useOas2}} 4 | {{/is}} -------------------------------------------------------------------------------- /src/main/resources/arguments/inflector.yaml: -------------------------------------------------------------------------------- 1 | arguments: 2 | - option: "--model-docs" 3 | description: "generate models documentation." 4 | type: "boolean" 5 | - option: "--api-docs" 6 | description: "generate apis documentation." 7 | type: "boolean" 8 | - option: "--model-tests" 9 | description: "generate model tests." 10 | type: "boolean" 11 | - option: "--api-tests" 12 | description: "generate apis tests." 13 | type: "boolean" 14 | - option: "--use-oas2" 15 | description: "use OpenAPI v2.0 (Swagger 1.5.x) annotations (by default, OpenAPI v3.0 is used)." 16 | type: "boolean" 17 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/pythonFlaskConnexion/__main__.mustache: -------------------------------------------------------------------------------- 1 | {{#supportPython2}} 2 | #!/usr/bin/env python 3 | {{/supportPython2}} 4 | {{^supportPython2}} 5 | #!/usr/bin/env python3 6 | {{/supportPython2}} 7 | 8 | import connexion 9 | 10 | from {{packageName}} import encoder 11 | 12 | 13 | def main(): 14 | app = connexion.App(__name__, specification_dir='./swagger/') 15 | app.app.json_encoder = encoder.JSONEncoder 16 | app.add_api('swagger.yaml', arguments={'title': '{{appName}}'}, pythonic_params=True) 17 | app.run(port={{serverPort}}) 18 | 19 | 20 | if __name__ == '__main__': 21 | main() 22 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/scala/client/client.mustache: -------------------------------------------------------------------------------- 1 | package {{invokerPackage}} 2 | 3 | {{#imports}}import {{import}} 4 | {{/imports}} 5 | import {{apiPackage}}._ 6 | 7 | import com.wordnik.swagger.client._ 8 | 9 | import java.io.Closeable 10 | 11 | class {{clientName}}(config: SwaggerConfig) extends Closeable { 12 | lazy val locator: ServiceLocator = config.locator 13 | lazy val name: String = config.name 14 | 15 | private[this] val client = transportClient 16 | 17 | protected def transportClient: TransportClient = new RestClient(config) 18 | 19 | def close() { 20 | client.close() 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/resteasy/formParams.mustache: -------------------------------------------------------------------------------- 1 | {{#is this 'form-param'}}{{#isNot this 'binary'}}{{#useOas2}}@ApiParam(value = "{{{description}}}"{{#required}}, required=true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}})@FormParam("{{baseName}}") {{{dataType}}} {{paramName}}{{/useOas2}}{{^useOas2}}@Parameter(description = "{{{description}}}"{{#required}}, required=true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}})@FormParam("{{baseName}}") {{{dataType}}} {{paramName}}{{/useOas2}}{{/isNot}}{{/is}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/csharp/packages_test.config.mustache: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/headerParams.mustache: -------------------------------------------------------------------------------- 1 | {{#is this 'header-param'}} 2 | {{#useOas2}}@ApiParam(value = "{{{description}}}" {{#required}},required=true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}})@HeaderParam("{{baseName}}") {{{dataType}}} {{paramName}}{{/useOas2}} 3 | {{^useOas2}}@Parameter(in = ParameterIn.HEADER, description = "{{{description}}}" {{#required}},required=true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}})@HeaderParam("{{baseName}}") {{{dataType}}} {{paramName}}{{/useOas2}} 4 | {{/is}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/resteasy/eap/formParams.mustache: -------------------------------------------------------------------------------- 1 | {{#is this 'form-param'}}{{#isNot this 'binary'}}{{#useOas2}}@ApiParam(value = "{{{description}}}"{{#required}}, required=true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}})@FormParam("{{baseName}}") {{{dataType}}} {{paramName}}{{/useOas2}}{{^useOas2}}@Parameter(description = "{{{description}}}"{{#required}}, required=true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}})@FormParam("{{baseName}}") {{{dataType}}} {{paramName}}{{/useOas2}}{{/isNot}}{{/is}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaSpring/allowableValuesAndDefaultValue.mustache: -------------------------------------------------------------------------------- 1 | {{#useOas2}}{{#allowableValues}}, allowableValues = "{{#values}}{{{.}}}{{^@last}}, {{/@last}}{{#@last}}{{/@last}}{{/values}}"{{/allowableValues}}{{#defaultValue}}, defaultValue = "{{{defaultValue}}}"{{/defaultValue}}{{/useOas2}}{{^useOas2}}, schema=@Schema({{#allowableValues}}allowableValues={ {{#values}}"{{{.}}}"{{^@last}}, {{/@last}}{{/values}}{{^values}}{{/values}} }{{#min}}, minimum="{{.}}"{{/min}}{{#max}}, maximum="{{.}}"{{/max}}{{/allowableValues}}{{#defaultValue}}{{#allowableValues}}, {{/allowableValues}}defaultValue="{{{defaultValue}}}"{{/defaultValue}}){{/useOas2}} -------------------------------------------------------------------------------- /bin/utils/detect_carriage_return.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | # grep for \r in the templates 5 | grep -RUIl $'\r$' src/main/resources/* 6 | 7 | if [ $? -ne 1 ]; then 8 | echo "Templates contain carriage return '/r'. Please remove it and try again." 9 | exit 1; 10 | fi 11 | 12 | 13 | # grep for \r in the generators 14 | #grep -RUIl $'\r$' modules/swagger-codegen/src/main/java/io/swagger/codegen/v3/*.java 15 | find src/main/java/ -type f -iname "*.java" -exec grep -RUIl $'\r$' {} \; | wc -l 16 | 17 | if [ $? -ne 0 ]; then 18 | echo "Generators contain carriage return '/r'. Please remove it and try again." 19 | exit 1; 20 | fi 21 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaSpring/libraries/spring-boot/homeController.mustache: -------------------------------------------------------------------------------- 1 | package {{configPackage}}; 2 | 3 | import org.springframework.stereotype.Controller; 4 | import org.springframework.web.bind.annotation.RequestMapping; 5 | 6 | /** 7 | * Home redirection to swagger api documentation 8 | */ 9 | @Controller 10 | public class HomeController { 11 | @RequestMapping(value = "/") 12 | public String index() { 13 | {{#useOas2}} 14 | return "redirect:swagger-ui.html"; 15 | {{/useOas2}} 16 | {{^useOas2}} 17 | return "redirect:/swagger-ui/"; 18 | {{/useOas2}} 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/R/element.mustache: -------------------------------------------------------------------------------- 1 | #' Element Class 2 | #' 3 | #' Element Class 4 | #' @export 5 | Element <- R6::R6Class( 6 | 'Element', 7 | public = list( 8 | id = NULL, 9 | name = NULL, 10 | initialize = function(id,name){ 11 | if (!missing(id)) { 12 | stopifnot(is.numeric(id), length(id) == 1) 13 | self$id <- id 14 | } 15 | if (!missing(name)) { 16 | stopifnot(is.character(name), length(name) == 1) 17 | self$name <- name 18 | } 19 | }, 20 | toJSON = function() { 21 | sprintf('{"id":%d,"name":"%s"}', self$id, self$name) 22 | } 23 | ) 24 | ) -------------------------------------------------------------------------------- /src/main/resources/handlebars/kotlin-client/infrastructure/Serializer.kt.mustache: -------------------------------------------------------------------------------- 1 | package {{packageName}}.infrastructure 2 | 3 | import com.squareup.moshi.Moshi 4 | import com.squareup.moshi.adapters.Rfc3339DateJsonAdapter 5 | import com.squareup.moshi.kotlin.reflect.KotlinJsonAdapterFactory 6 | import java.util.Date 7 | 8 | object Serializer { 9 | @JvmStatic 10 | val moshi: Moshi = Moshi.Builder() 11 | .add(KotlinJsonAdapterFactory()) 12 | .add(Date::class.java, Rfc3339DateJsonAdapter().nullSafe()) 13 | .add(LocalDateTimeAdapter()) 14 | .add(LocalDateAdapter()) 15 | .build() 16 | } -------------------------------------------------------------------------------- /src/main/resources/handlebars/nodejs/package.mustache: -------------------------------------------------------------------------------- 1 | { 2 | "name": "{{projectName}}", 3 | "version": "{{appVersion}}", 4 | "description": "{{{appDescription}}}", 5 | "main": "index.js", 6 | {{^googleCloudFunctions}} 7 | "scripts": { 8 | "prestart": "npm install", 9 | "start": "node index.js" 10 | }, 11 | {{/googleCloudFunctions}} 12 | "keywords": [ 13 | "swagger" 14 | ], 15 | "license": "Unlicense", 16 | "private": true, 17 | "dependencies": { 18 | {{^googleCloudFunctions}} 19 | "connect": "^3.2.0", 20 | {{/googleCloudFunctions}} 21 | "js-yaml": "^3.3.0", 22 | "oas3-tools": "^2.2.3" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/aspnetcore/web.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/csharp-471/ExceptionFactory.mustache: -------------------------------------------------------------------------------- 1 | {{>partial_header}} 2 | 3 | using System; 4 | {{#netStandard}} 5 | using RestSharp.Portable; 6 | {{/netStandard}} 7 | {{^netStandard}} 8 | using RestSharp; 9 | {{/netStandard}} 10 | 11 | namespace {{packageName}}.Client 12 | { 13 | /// 14 | /// A delegate to ExceptionFactory method 15 | /// 16 | /// Method name 17 | /// Response 18 | /// Exceptions 19 | {{>visibility}} delegate Exception ExceptionFactory(string methodName, RestResponse response); 20 | } 21 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/csharp/ExceptionFactory.mustache: -------------------------------------------------------------------------------- 1 | {{>partial_header}} 2 | 3 | using System; 4 | {{#netStandard}} 5 | using RestSharp.Portable; 6 | {{/netStandard}} 7 | {{^netStandard}} 8 | using RestSharp; 9 | {{/netStandard}} 10 | 11 | namespace {{packageName}}.Client 12 | { 13 | /// 14 | /// A delegate to ExceptionFactory method 15 | /// 16 | /// Method name 17 | /// Response 18 | /// Exceptions 19 | {{>visibility}} delegate Exception ExceptionFactory(string methodName, IRestResponse response); 20 | } 21 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/ruby/partial_model_enum_class.mustache: -------------------------------------------------------------------------------- 1 | class {{classname}} 2 | {{#allowableValues}} 3 | {{#enumVars}} 4 | {{{name}}} = {{{value}}}.freeze 5 | {{/enumVars}} 6 | {{/allowableValues}} 7 | 8 | # Builds the enum from string 9 | # @param [String] The enum value in the form of the string 10 | # @return [String] The enum value 11 | def build_from_hash(value) 12 | constantValues = {{classname}}.constants.select { |c| {{classname}}::const_get(c) == value } 13 | raise "Invalid ENUM value #{value} for class #{{{classname}}}" if constantValues.empty? 14 | value 15 | end 16 | end -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaInflector/model.mustache: -------------------------------------------------------------------------------- 1 | package {{package}}; 2 | {{^x-is-composed-model}} 3 | import java.util.Objects; 4 | {{#imports}}import {{import}}; 5 | {{/imports}} 6 | 7 | {{#serializableModel}}import java.io.Serializable;{{/serializableModel}} 8 | {{/x-is-composed-model}} 9 | {{#models}} 10 | {{#model}} 11 | {{#description}} 12 | /** 13 | * {{description}} 14 | **/ 15 | {{/description}} 16 | {{#isComposedModel}} 17 | {{>interface}} 18 | {{/isComposedModel}} 19 | {{^isComposedModel}} 20 | {{#is this 'enum'}} 21 | {{>enumOuterClass}} 22 | {{/is}} 23 | {{#isNot this 'enum'}}{{>pojo}}{{/isNot}} 24 | {{/isComposedModel}} 25 | {{/model}} 26 | {{/models}} 27 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/cxf-cdi/pathParams.mustache: -------------------------------------------------------------------------------- 1 | {{#is this 'path-param'}}{{#useBeanValidation}}{{>beanValidationPathParams}}{{/useBeanValidation}} 2 | {{#useOas2}}@ApiParam(value = "{{{description}}}"{{#required}},required=true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}) @PathParam("{{baseName}}") {{{dataType}}} {{paramName}}{{/useOas2}} 3 | {{^useOas2}}@Parameter(description = "{{{description}}}"{{#required}},required=true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}) @PathParam("{{baseName}}") {{{dataType}}} {{paramName}}{{/useOas2}} 4 | {{/is}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/kotlin-client/infrastructure/RequestConfig.kt.mustache: -------------------------------------------------------------------------------- 1 | package {{packageName}}.infrastructure 2 | 3 | /** 4 | * Defines a config object for a given request. 5 | * NOTE: This object doesn't include 'body' because it 6 | * allows for caching of the constructed object 7 | * for many request definitions. 8 | * NOTE: Headers is a Map because rfc2616 defines 9 | * multi-valued headers as csv-only. 10 | */ 11 | data class RequestConfig( 12 | val method: RequestMethod, 13 | val path: String, 14 | val headers: Map = mapOf(), 15 | val query: Map> = mapOf() 16 | ) -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/resteasy/web.mustache: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | ApiOriginFilter 8 | {{apiPackage}}.ApiOriginFilter 9 | 10 | 11 | ApiOriginFilter 12 | /* 13 | 14 | 15 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/RFC3339DateFormat.mustache: -------------------------------------------------------------------------------- 1 | package {{apiPackage}}; 2 | 3 | import com.fasterxml.jackson.databind.util.ISO8601DateFormat; 4 | import com.fasterxml.jackson.databind.util.ISO8601Utils; 5 | 6 | import java.text.FieldPosition; 7 | import java.util.Date; 8 | 9 | public class RFC3339DateFormat extends ISO8601DateFormat { 10 | 11 | // Same as ISO8601DateFormat but serializing milliseconds. 12 | @Override 13 | public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fieldPosition) { 14 | String value = ISO8601Utils.format(date, true); 15 | toAppendTo.append(value); 16 | return toAppendTo; 17 | } 18 | 19 | } -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaSpring/application.mustache: -------------------------------------------------------------------------------- 1 | {{#useOas2}} 2 | springfox.documentation.swagger.v2.path=/api-docs 3 | server.contextPath={{^contextPathWithoutHost}}/{{/contextPathWithoutHost}}{{#contextPathWithoutHost}}{{contextPathWithoutHost}}{{/contextPathWithoutHost}} 4 | {{/useOas2}} 5 | {{^useOas2}} 6 | springdoc.api-docs.path=/api-docs 7 | {{/useOas2}} 8 | server.servlet.contextPath={{^contextPathWithoutHost}}/{{/contextPathWithoutHost}}{{#contextPathWithoutHost}}{{contextPathWithoutHost}}{{/contextPathWithoutHost}} 9 | server.port={{serverPort}} 10 | spring.jackson.date-format={{basePackage}}.RFC3339DateFormat 11 | spring.jackson.serialization.WRITE_DATES_AS_TIMESTAMPS=false -------------------------------------------------------------------------------- /src/main/resources/handlebars/php/model_enum.mustache: -------------------------------------------------------------------------------- 1 | class {{classname}} 2 | { 3 | /** 4 | * Possible values of this enum 5 | */ 6 | {{#allowableValues}} 7 | {{#enumVars}} 8 | const {{{name}}} = {{{value}}}; 9 | {{/enumVars}} 10 | {{/allowableValues}} 11 | /** 12 | * Gets allowable values of the enum 13 | * @return string[] 14 | */ 15 | public static function getAllowableEnumValues() 16 | { 17 | return [ 18 | {{#allowableValues}} 19 | {{#enumVars}} 20 | self::{{{name}}}{{#hasMore}},{{/hasMore}} 21 | {{/enumVars}} 22 | {{/allowableValues}} 23 | ]; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/Java/RFC3339DateFormat.mustache: -------------------------------------------------------------------------------- 1 | {{>licenseInfo}} 2 | package {{invokerPackage}}; 3 | 4 | import com.fasterxml.jackson.databind.util.ISO8601DateFormat; 5 | import com.fasterxml.jackson.databind.util.ISO8601Utils; 6 | 7 | import java.text.FieldPosition; 8 | import java.util.Date; 9 | 10 | 11 | public class RFC3339DateFormat extends ISO8601DateFormat { 12 | 13 | // Same as ISO8601DateFormat but serializing milliseconds. 14 | @Override 15 | public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fieldPosition) { 16 | String value = ISO8601Utils.format(date, true); 17 | toAppendTo.append(value); 18 | return toAppendTo; 19 | } 20 | 21 | } -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/cxf/model.mustache: -------------------------------------------------------------------------------- 1 | package {{package}}; 2 | 3 | {{^isComposedModel}} 4 | {{#imports}}import {{import}}; 5 | {{/imports}} 6 | {{#useBeanValidation}} 7 | {{#jakarta}} 8 | import jakarta.validation.constraints.*; 9 | {{/jakarta}} 10 | {{^jakarta}} 11 | import javax.validation.constraints.*; 12 | {{/jakarta}} 13 | {{/useBeanValidation}} 14 | {{/isComposedModel}} 15 | 16 | {{#models}} 17 | {{#model}} 18 | {{#isComposedModel}} 19 | {{>interface}} 20 | {{/isComposedModel}} 21 | {{^isComposedModel}} 22 | {{#is this 'enum'}} 23 | {{>enumOuterClass}} 24 | {{/is}} 25 | {{#isNot this 'enum'}} 26 | {{>pojo}} 27 | {{/isNot}} 28 | {{/isComposedModel}} 29 | {{/model}} 30 | {{/models}} 31 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaJaxRS/resteasy/RFC3339DateFormat.mustache: -------------------------------------------------------------------------------- 1 | package {{invokerPackage}}; 2 | 3 | import com.fasterxml.jackson.databind.util.ISO8601DateFormat; 4 | import com.fasterxml.jackson.databind.util.ISO8601Utils; 5 | 6 | import java.text.FieldPosition; 7 | import java.util.Date; 8 | 9 | public class RFC3339DateFormat extends ISO8601DateFormat { 10 | 11 | // Same as ISO8601DateFormat but serializing milliseconds. 12 | @Override 13 | public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fieldPosition) { 14 | String value = ISO8601Utils.format(date, true); 15 | toAppendTo.append(value); 16 | return toAppendTo; 17 | } 18 | 19 | } -------------------------------------------------------------------------------- /src/main/resources/handlebars/kotlin-server/libraries/ktor/_api_body.mustache: -------------------------------------------------------------------------------- 1 | {{#hasAuthMethods}} 2 | {{>libraries/ktor/_principal}} 3 | if (principal == null) { 4 | call.respond(HttpStatusCode.Unauthorized) 5 | } else { 6 | {{#examples}} 7 | {{#@first}} 8 | {{>libraries/ktor/_response}} 9 | {{/@first}} 10 | {{/examples}} 11 | {{^examples}} 12 | call.respond(HttpStatusCode.NotImplemented) 13 | {{/examples}} 14 | } 15 | {{/hasAuthMethods}} 16 | {{^hasAuthMethods}} 17 | {{#examples}} 18 | {{#@first}} 19 | {{>libraries/ktor/_response}} 20 | {{/@first}} 21 | {{/examples}} 22 | {{^examples}} 23 | call.respond(HttpStatusCode.NotImplemented) 24 | {{/examples}} 25 | {{/hasAuthMethods}} -------------------------------------------------------------------------------- /src/main/resources/handlebars/kotlin-server/libraries/ktor/application.conf.mustache: -------------------------------------------------------------------------------- 1 | ktor { 2 | deployment { 3 | environment = development 4 | port = 8080 5 | autoreload = true 6 | watch = [ {{packageName}} ] 7 | } 8 | 9 | application { 10 | modules = [ {{packageName}}.AppMainKt.main ] 11 | } 12 | } 13 | 14 | # Typesafe config allows multiple ways to provide configuration values without hard-coding them here. 15 | # Please see https://github.com/lightbend/config for details. 16 | auth { 17 | oauth { 18 | {{#authMethods}} 19 | {{#isOAuth}} 20 | {{name}} { 21 | clientId = "" 22 | clientSecret = "" 23 | } 24 | {{/isOAuth}} 25 | {{/authMethods}} 26 | } 27 | } -------------------------------------------------------------------------------- /src/main/resources/handlebars/JavaSpring/NotUndefined.mustache: -------------------------------------------------------------------------------- 1 | package {{configPackage}}; 2 | 3 | {{#jakarta}} 4 | import jakarta.validation.Constraint; 5 | import jakarta.validation.Payload; 6 | {{/jakarta}} 7 | {{^jakarta}} 8 | import javax.validation.Constraint; 9 | import javax.validation.Payload; 10 | {{/jakarta}} 11 | import java.lang.annotation.*; 12 | 13 | @Target({ElementType.TYPE}) 14 | @Retention(RetentionPolicy.RUNTIME) 15 | @Documented 16 | @Constraint(validatedBy = NotUndefinedValidator.class) 17 | public @interface NotUndefined { 18 | String message() default "field cannot be undefined"; 19 | Class[] groups() default {}; 20 | Class[] payload() default {}; 21 | } 22 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/scala/akka-http-server/model.mustache: -------------------------------------------------------------------------------- 1 | package {{package}} 2 | 3 | {{#imports}} 4 | import {{import}} 5 | {{/imports}} 6 | 7 | {{#models}} 8 | {{#model}} 9 | /** 10 | {{#title}} * = {{{title}}} = 11 | * 12 | {{/title}} 13 | {{#description}} * {{{description}}} 14 | * 15 | {{/description}} 16 | {{#vars}} 17 | * @param {{{name}}} {{#description}}{{{description}}}{{/description}}{{#example}} for example: ''{{{example}}}''{{/example}} 18 | {{/vars}} 19 | */ 20 | case class {{classname}} ( 21 | {{#vars}} 22 | {{{name}}}: {{^required}}Option[{{/required}}{{datatype}}{{^required}}]{{/required}}{{#hasMore}},{{/hasMore}} 23 | {{/vars}} 24 | ) 25 | 26 | {{/model}} 27 | {{/models}} 28 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/dart/apilib.mustache: -------------------------------------------------------------------------------- 1 | library {{pubName}}.api; 2 | 3 | import 'dart:async'; 4 | import 'dart:convert';{{#browserClient}} 5 | import 'package:http/browser_client.dart';{{/browserClient}} 6 | import 'package:http/http.dart'; 7 | 8 | part 'api_client.dart'; 9 | part 'api_helper.dart'; 10 | part 'api_exception.dart'; 11 | part 'auth/authentication.dart'; 12 | part 'auth/api_key_auth.dart'; 13 | part 'auth/oauth.dart'; 14 | part 'auth/http_basic_auth.dart'; 15 | 16 | {{#apiInfo}}{{#apis}}part 'api/{{classFilename}}.dart'; 17 | {{/apis}}{{/apiInfo}} 18 | {{#models}}{{#model}}part 'model/{{classFilename}}.dart'; 19 | {{/model}}{{/models}} 20 | 21 | ApiClient defaultApiClient = new ApiClient(); 22 | -------------------------------------------------------------------------------- /src/main/java/io/swagger/codegen/v3/generators/features/SpringFeatures.java: -------------------------------------------------------------------------------- 1 | package io.swagger.codegen.v3.generators.features; 2 | 3 | public interface SpringFeatures extends BeanValidationFeatures { 4 | 5 | String GENERATE_SPRING_APPLICATION = "generateSpringApplication"; 6 | 7 | String GENERATE_SPRING_BOOT_APPLICATION = "generateSpringBootApplication"; 8 | 9 | String USE_SPRING_ANNOTATION_CONFIG = "useSpringAnnotationConfig"; 10 | 11 | void setGenerateSpringApplication(boolean useGenerateSpringApplication); 12 | 13 | void setGenerateSpringBootApplication(boolean generateSpringBootApplication); 14 | 15 | void setUseSpringAnnotationConfig(boolean useSpringAnnotationConfig); 16 | 17 | 18 | } 19 | -------------------------------------------------------------------------------- /src/main/resources/handlebars/typescript-fetch/modelAlias.mustache: -------------------------------------------------------------------------------- 1 | /** 2 | * {{{description}}} 3 | * @export 4 | */ 5 | export type {{classname}} = {{#parent}}{{{parent}}}{{/parent}}{{^parent}}{{{dataType}}}{{/parent}}{{#hasEnums}} 6 | 7 | /** 8 | * @export 9 | * @namespace {{classname}} 10 | */ 11 | export namespace {{classname}} { 12 | {{#vars}} 13 | {{#isEnum}} 14 | /** 15 | * @export 16 | * @enum {string} 17 | */ 18 | export enum {{enumName}} { 19 | {{#allowableValues}} 20 | {{#enumVars}} 21 | {{{name}}} = {{{value}}}{{^@last}},{{/@last}} 22 | {{/enumVars}} 23 | {{/allowableValues}} 24 | } 25 | {{/isEnum}} 26 | {{/vars}} 27 | }{{/hasEnums}} 28 | --------------------------------------------------------------------------------