Skip to content

Commit

Permalink
Add NSwag specific metadata to OpenApiReference OpenApiProjectReferen…
Browse files Browse the repository at this point in the history
…ce items and use it to build the command line. (#4565)

* Add NSwag specific metadata to OpenApiReference OpenApiProjectReference items and use it to build the command line.

* Added support to for client and client interface supression.
  • Loading branch information
paulomorgado authored Dec 8, 2023
1 parent 6858a7e commit b7190d9
Show file tree
Hide file tree
Showing 3 changed files with 426 additions and 2 deletions.
170 changes: 170 additions & 0 deletions src/NSwag.ApiDescription.Client/NSwag.ApiDescription.Client.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,179 @@
<ItemDefinitionGroup>
<OpenApiReference>
<CodeGenerator>NSwagCSharp</CodeGenerator>
<NSwagClientBaseClass>$(NSwagClientBaseClass)</NSwagClientBaseClass>
<NSwagConfigurationClass>$(NSwagConfigurationClass)</NSwagConfigurationClass>
<NSwagGenerateClientClasses>$(NSwagGenerateClientClasses)</NSwagGenerateClientClasses>
<NSwagSuppressClientClassesOutput>$(NSwagSuppressClientClassesOutput)</NSwagSuppressClientClassesOutput>
<NSwagGenerateClientInterfaces>$(NSwagGenerateClientInterfaces)</NSwagGenerateClientInterfaces>
<NSwagSuppressClientInterfacesOutput>$(NSwagSuppressClientInterfacesOutput)</NSwagSuppressClientInterfacesOutput>
<NSwagClientBaseInterface>$(NSwagClientBaseInterface)</NSwagClientBaseInterface>
<NSwagInjectHttpClient>$(NSwagInjectHttpClient)</NSwagInjectHttpClient>
<NSwagDisposeHttpClient>$(NSwagDisposeHttpClient)</NSwagDisposeHttpClient>
<NSwagProtectedMethods>$(NSwagProtectedMethods)</NSwagProtectedMethods>
<NSwagGenerateExceptionClasses>$(NSwagGenerateExceptionClasses)</NSwagGenerateExceptionClasses>
<NSwagExceptionClass>$(NSwagExceptionClass)</NSwagExceptionClass>
<NSwagWrapDtoExceptions>$(NSwagWrapDtoExceptions)</NSwagWrapDtoExceptions>
<NSwagUseHttpClientCreationMethod>$(NSwagUseHttpClientCreationMethod)</NSwagUseHttpClientCreationMethod>
<NSwagHttpClientType>$(NSwagHttpClientType)</NSwagHttpClientType>
<NSwagUseHttpRequestMessageCreationMethod>$(NSwagUseHttpRequestMessageCreationMethod)</NSwagUseHttpRequestMessageCreationMethod>
<NSwagUseBaseUrl>$(NSwagUseBaseUrl)</NSwagUseBaseUrl>
<NSwagGenerateBaseUrlProperty>$(NSwagGenerateBaseUrlProperty)</NSwagGenerateBaseUrlProperty>
<NSwagGenerateSyncMethods>$(NSwagGenerateSyncMethods)</NSwagGenerateSyncMethods>
<NSwagGeneratePrepareRequestAndProcessResponseAsAsyncMethods>$(NSwagGeneratePrepareRequestAndProcessResponseAsAsyncMethods)</NSwagGeneratePrepareRequestAndProcessResponseAsAsyncMethods>
<NSwagExposeJsonSerializerSettings>$(NSwagExposeJsonSerializerSettings)</NSwagExposeJsonSerializerSettings>
<NSwagClientClassAccessModifier>$(NSwagClientClassAccessModifier)</NSwagClientClassAccessModifier>
<NSwagTypeAccessModifier>$(NSwagTypeAccessModifier)</NSwagTypeAccessModifier>
<NSwagGenerateContractsOutput>$(NSwagGenerateContractsOutput)</NSwagGenerateContractsOutput>
<NSwagContractsNamespace>$(NSwagContractsNamespace)</NSwagContractsNamespace>
<NSwagContractsOutputFilePath>$(NSwagContractsOutputFilePath)</NSwagContractsOutputFilePath>
<NSwagParameterDateTimeFormat>$(NSwagParameterDateTimeFormat)</NSwagParameterDateTimeFormat>
<NSwagParameterDateFormat>$(NSwagParameterDateFormat)</NSwagParameterDateFormat>
<NSwagGenerateUpdateJsonSerializerSettingsMethod>$(NSwagGenerateUpdateJsonSerializerSettingsMethod)</NSwagGenerateUpdateJsonSerializerSettingsMethod>
<NSwagUseRequestAndResponseSerializationSettings>$(NSwagUseRequestAndResponseSerializationSettings)</NSwagUseRequestAndResponseSerializationSettings>
<NSwagSerializeTypeInformation>$(NSwagSerializeTypeInformation)</NSwagSerializeTypeInformation>
<NSwagQueryNullValue>$(NSwagQueryNullValue)</NSwagQueryNullValue>
<NSwagOperationGenerationMode>$(NSwagOperationGenerationMode)</NSwagOperationGenerationMode>
<NSwagAdditionalNamespaceUsages>$(NSwagAdditionalNamespaceUsages)</NSwagAdditionalNamespaceUsages>
<NSwagAdditionalContractNamespaceUsages>$(NSwagAdditionalContractNamespaceUsages)</NSwagAdditionalContractNamespaceUsages>
<NSwagGenerateOptionalParameters>$(NSwagGenerateOptionalParameters)</NSwagGenerateOptionalParameters>
<NSwagGenerateJsonMethods>$(NSwagGenerateJsonMethods)</NSwagGenerateJsonMethods>
<NSwagEnforceFlagEnums>$(NSwagEnforceFlagEnums)</NSwagEnforceFlagEnums>
<NSwagParameterArrayType>$(NSwagParameterArrayType)</NSwagParameterArrayType>
<NSwagParameterDictionaryType>$(NSwagParameterDictionaryType)</NSwagParameterDictionaryType>
<NSwagResponseArrayType>$(NSwagResponseArrayType)</NSwagResponseArrayType>
<NSwagResponseDictionaryType>$(NSwagResponseDictionaryType)</NSwagResponseDictionaryType>
<NSwagWrapResponses>$(NSwagWrapResponses)</NSwagWrapResponses>
<NSwagWrapResponseMethods>$(NSwagWrapResponseMethods)</NSwagWrapResponseMethods>
<NSwagGenerateResponseClasses>$(NSwagGenerateResponseClasses)</NSwagGenerateResponseClasses>
<NSwagResponseClass>$(NSwagResponseClass)</NSwagResponseClass>
<NSwagNamespace>$(NSwagNamespace)</NSwagNamespace>
<NSwagRequiredPropertiesMustBeDefined>$(NSwagRequiredPropertiesMustBeDefined)</NSwagRequiredPropertiesMustBeDefined>
<NSwagDateType>$(NSwagDateType)</NSwagDateType>
<NSwagJsonConverters>$(NSwagJsonConverters)</NSwagJsonConverters>
<NSwagAnyType>$(NSwagAnyType)</NSwagAnyType>
<NSwagDateTimeType>$(NSwagDateTimeType)</NSwagDateTimeType>
<NSwagTimeType>$(NSwagTimeType)</NSwagTimeType>
<NSwagTimeSpanType>$(NSwagTimeSpanType)</NSwagTimeSpanType>
<NSwagArrayType>$(NSwagArrayType)</NSwagArrayType>
<NSwagArrayInstanceType>$(NSwagArrayInstanceType)</NSwagArrayInstanceType>
<NSwagDictionaryType>$(NSwagDictionaryType)</NSwagDictionaryType>
<NSwagDictionaryInstanceType>$(NSwagDictionaryInstanceType)</NSwagDictionaryInstanceType>
<NSwagArrayBaseType>$(NSwagArrayBaseType)</NSwagArrayBaseType>
<NSwagDictionaryBaseType>$(NSwagDictionaryBaseType)</NSwagDictionaryBaseType>
<NSwagClassStyle>$(NSwagClassStyle)</NSwagClassStyle>
<NSwagJsonLibrary>$(NSwagJsonLibrary)</NSwagJsonLibrary>
<NSwagGenerateDefaultValues>$(NSwagGenerateDefaultValues)</NSwagGenerateDefaultValues>
<NSwagGenerateDataAnnotations>$(NSwagGenerateDataAnnotations)</NSwagGenerateDataAnnotations>
<NSwagExcludedTypeNames>$(NSwagExcludedTypeNames)</NSwagExcludedTypeNames>
<NSwagExcludedParameterNames>$(NSwagExcludedParameterNames)</NSwagExcludedParameterNames>
<NSwagHandleReferences>$(NSwagHandleReferences)</NSwagHandleReferences>
<NSwagGenerateImmutableArrayProperties>$(NSwagGenerateImmutableArrayProperties)</NSwagGenerateImmutableArrayProperties>
<NSwagGenerateImmutableDictionaryProperties>$(NSwagGenerateImmutableDictionaryProperties)</NSwagGenerateImmutableDictionaryProperties>
<NSwagJsonSerializerSettingsTransformationMethod>$(NSwagJsonSerializerSettingsTransformationMethod)</NSwagJsonSerializerSettingsTransformationMethod>
<NSwagInlineNamedArrays>$(NSwagInlineNamedArrays)</NSwagInlineNamedArrays>
<NSwagInlineNamedDictionaries>$(NSwagInlineNamedDictionaries)</NSwagInlineNamedDictionaries>
<NSwagInlineNamedTuples>$(NSwagInlineNamedTuples)</NSwagInlineNamedTuples>
<NSwagInlineNamedAny>$(NSwagInlineNamedAny)</NSwagInlineNamedAny>
<NSwagGenerateDtoTypes>$(NSwagGenerateDtoTypes)</NSwagGenerateDtoTypes>
<NSwagGenerateOptionalPropertiesAsNullable>$(NSwagGenerateOptionalPropertiesAsNullable)</NSwagGenerateOptionalPropertiesAsNullable>
<NSwagGenerateNullableReferenceTypes>$(NSwagGenerateNullableReferenceTypes)</NSwagGenerateNullableReferenceTypes>
<NSwagTemplateDirectory>$(NSwagTemplateDirectory)</NSwagTemplateDirectory>
<NSwagTypeNameGeneratorType>$(NSwagTypeNameGeneratorType)</NSwagTypeNameGeneratorType>
<NSwagPropertyNameGeneratorType>$(NSwagPropertyNameGeneratorType)</NSwagPropertyNameGeneratorType>
<NSwagEnumNameGeneratorType>$(NSwagEnumNameGeneratorType)</NSwagEnumNameGeneratorType>
<NSwagServiceHost>$(NSwagServiceHost)</NSwagServiceHost>
<NSwagServiceSchemes>$(NSwagServiceSchemes)</NSwagServiceSchemes>
<NSwagOutput>$(NSwagOutput)</NSwagOutput>
<NSwagNewLineBehavior>$(NSwagNewLineBehavior)</NSwagNewLineBehavior>
</OpenApiReference>
<OpenApiProjectReference>
<CodeGenerator>NSwagCSharp</CodeGenerator>
<NSwagClientBaseClass>$(NSwagClientBaseClass)</NSwagClientBaseClass>
<NSwagConfigurationClass>$(NSwagConfigurationClass)</NSwagConfigurationClass>
<NSwagGenerateClientClasses>$(NSwagGenerateClientClasses)</NSwagGenerateClientClasses>
<NSwagSuppressClientClassesOutput>$(NSwagSuppressClientClassesOutput)</NSwagSuppressClientClassesOutput>
<NSwagGenerateClientInterfaces>$(NSwagGenerateClientInterfaces)</NSwagGenerateClientInterfaces>
<NSwagSuppressClientInterfacesOutput>$(NSwagSuppressClientInterfacesOutput)</NSwagSuppressClientInterfacesOutput>
<NSwagClientBaseInterface>$(NSwagClientBaseInterface)</NSwagClientBaseInterface>
<NSwagInjectHttpClient>$(NSwagInjectHttpClient)</NSwagInjectHttpClient>
<NSwagDisposeHttpClient>$(NSwagDisposeHttpClient)</NSwagDisposeHttpClient>
<NSwagProtectedMethods>$(NSwagProtectedMethods)</NSwagProtectedMethods>
<NSwagGenerateExceptionClasses>$(NSwagGenerateExceptionClasses)</NSwagGenerateExceptionClasses>
<NSwagExceptionClass>$(NSwagExceptionClass)</NSwagExceptionClass>
<NSwagWrapDtoExceptions>$(NSwagWrapDtoExceptions)</NSwagWrapDtoExceptions>
<NSwagUseHttpClientCreationMethod>$(NSwagUseHttpClientCreationMethod)</NSwagUseHttpClientCreationMethod>
<NSwagHttpClientType>$(NSwagHttpClientType)</NSwagHttpClientType>
<NSwagUseHttpRequestMessageCreationMethod>$(NSwagUseHttpRequestMessageCreationMethod)</NSwagUseHttpRequestMessageCreationMethod>
<NSwagUseBaseUrl>$(NSwagUseBaseUrl)</NSwagUseBaseUrl>
<NSwagGenerateBaseUrlProperty>$(NSwagGenerateBaseUrlProperty)</NSwagGenerateBaseUrlProperty>
<NSwagGenerateSyncMethods>$(NSwagGenerateSyncMethods)</NSwagGenerateSyncMethods>
<NSwagGeneratePrepareRequestAndProcessResponseAsAsyncMethods>$(NSwagGeneratePrepareRequestAndProcessResponseAsAsyncMethods)</NSwagGeneratePrepareRequestAndProcessResponseAsAsyncMethods>
<NSwagExposeJsonSerializerSettings>$(NSwagExposeJsonSerializerSettings)</NSwagExposeJsonSerializerSettings>
<NSwagClientClassAccessModifier>$(NSwagClientClassAccessModifier)</NSwagClientClassAccessModifier>
<NSwagTypeAccessModifier>$(NSwagTypeAccessModifier)</NSwagTypeAccessModifier>
<NSwagGenerateContractsOutput>$(NSwagGenerateContractsOutput)</NSwagGenerateContractsOutput>
<NSwagContractsNamespace>$(NSwagContractsNamespace)</NSwagContractsNamespace>
<NSwagContractsOutputFilePath>$(NSwagContractsOutputFilePath)</NSwagContractsOutputFilePath>
<NSwagParameterDateTimeFormat>$(NSwagParameterDateTimeFormat)</NSwagParameterDateTimeFormat>
<NSwagParameterDateFormat>$(NSwagParameterDateFormat)</NSwagParameterDateFormat>
<NSwagGenerateUpdateJsonSerializerSettingsMethod>$(NSwagGenerateUpdateJsonSerializerSettingsMethod)</NSwagGenerateUpdateJsonSerializerSettingsMethod>
<NSwagUseRequestAndResponseSerializationSettings>$(NSwagUseRequestAndResponseSerializationSettings)</NSwagUseRequestAndResponseSerializationSettings>
<NSwagSerializeTypeInformation>$(NSwagSerializeTypeInformation)</NSwagSerializeTypeInformation>
<NSwagQueryNullValue>$(NSwagQueryNullValue)</NSwagQueryNullValue>
<NSwagOperationGenerationMode>$(NSwagOperationGenerationMode)</NSwagOperationGenerationMode>
<NSwagAdditionalNamespaceUsages>$(NSwagAdditionalNamespaceUsages)</NSwagAdditionalNamespaceUsages>
<NSwagAdditionalContractNamespaceUsages>$(NSwagAdditionalContractNamespaceUsages)</NSwagAdditionalContractNamespaceUsages>
<NSwagGenerateOptionalParameters>$(NSwagGenerateOptionalParameters)</NSwagGenerateOptionalParameters>
<NSwagGenerateJsonMethods>$(NSwagGenerateJsonMethods)</NSwagGenerateJsonMethods>
<NSwagEnforceFlagEnums>$(NSwagEnforceFlagEnums)</NSwagEnforceFlagEnums>
<NSwagParameterArrayType>$(NSwagParameterArrayType)</NSwagParameterArrayType>
<NSwagParameterDictionaryType>$(NSwagParameterDictionaryType)</NSwagParameterDictionaryType>
<NSwagResponseArrayType>$(NSwagResponseArrayType)</NSwagResponseArrayType>
<NSwagResponseDictionaryType>$(NSwagResponseDictionaryType)</NSwagResponseDictionaryType>
<NSwagWrapResponses>$(NSwagWrapResponses)</NSwagWrapResponses>
<NSwagWrapResponseMethods>$(NSwagWrapResponseMethods)</NSwagWrapResponseMethods>
<NSwagGenerateResponseClasses>$(NSwagGenerateResponseClasses)</NSwagGenerateResponseClasses>
<NSwagResponseClass>$(NSwagResponseClass)</NSwagResponseClass>
<NSwagNamespace>$(NSwagNamespace)</NSwagNamespace>
<NSwagRequiredPropertiesMustBeDefined>$(NSwagRequiredPropertiesMustBeDefined)</NSwagRequiredPropertiesMustBeDefined>
<NSwagDateType>$(NSwagDateType)</NSwagDateType>
<NSwagJsonConverters>$(NSwagJsonConverters)</NSwagJsonConverters>
<NSwagAnyType>$(NSwagAnyType)</NSwagAnyType>
<NSwagDateTimeType>$(NSwagDateTimeType)</NSwagDateTimeType>
<NSwagTimeType>$(NSwagTimeType)</NSwagTimeType>
<NSwagTimeSpanType>$(NSwagTimeSpanType)</NSwagTimeSpanType>
<NSwagArrayType>$(NSwagArrayType)</NSwagArrayType>
<NSwagArrayInstanceType>$(NSwagArrayInstanceType)</NSwagArrayInstanceType>
<NSwagDictionaryType>$(NSwagDictionaryType)</NSwagDictionaryType>
<NSwagDictionaryInstanceType>$(NSwagDictionaryInstanceType)</NSwagDictionaryInstanceType>
<NSwagArrayBaseType>$(NSwagArrayBaseType)</NSwagArrayBaseType>
<NSwagDictionaryBaseType>$(NSwagDictionaryBaseType)</NSwagDictionaryBaseType>
<NSwagClassStyle>$(NSwagClassStyle)</NSwagClassStyle>
<NSwagJsonLibrary>$(NSwagJsonLibrary)</NSwagJsonLibrary>
<NSwagGenerateDefaultValues>$(NSwagGenerateDefaultValues)</NSwagGenerateDefaultValues>
<NSwagGenerateDataAnnotations>$(NSwagGenerateDataAnnotations)</NSwagGenerateDataAnnotations>
<NSwagExcludedTypeNames>$(NSwagExcludedTypeNames)</NSwagExcludedTypeNames>
<NSwagExcludedParameterNames>$(NSwagExcludedParameterNames)</NSwagExcludedParameterNames>
<NSwagHandleReferences>$(NSwagHandleReferences)</NSwagHandleReferences>
<NSwagGenerateImmutableArrayProperties>$(NSwagGenerateImmutableArrayProperties)</NSwagGenerateImmutableArrayProperties>
<NSwagGenerateImmutableDictionaryProperties>$(NSwagGenerateImmutableDictionaryProperties)</NSwagGenerateImmutableDictionaryProperties>
<NSwagJsonSerializerSettingsTransformationMethod>$(NSwagJsonSerializerSettingsTransformationMethod)</NSwagJsonSerializerSettingsTransformationMethod>
<NSwagInlineNamedArrays>$(NSwagInlineNamedArrays)</NSwagInlineNamedArrays>
<NSwagInlineNamedDictionaries>$(NSwagInlineNamedDictionaries)</NSwagInlineNamedDictionaries>
<NSwagInlineNamedTuples>$(NSwagInlineNamedTuples)</NSwagInlineNamedTuples>
<NSwagInlineNamedAny>$(NSwagInlineNamedAny)</NSwagInlineNamedAny>
<NSwagGenerateDtoTypes>$(NSwagGenerateDtoTypes)</NSwagGenerateDtoTypes>
<NSwagGenerateOptionalPropertiesAsNullable>$(NSwagGenerateOptionalPropertiesAsNullable)</NSwagGenerateOptionalPropertiesAsNullable>
<NSwagGenerateNullableReferenceTypes>$(NSwagGenerateNullableReferenceTypes)</NSwagGenerateNullableReferenceTypes>
<NSwagTemplateDirectory>$(NSwagTemplateDirectory)</NSwagTemplateDirectory>
<NSwagTypeNameGeneratorType>$(NSwagTypeNameGeneratorType)</NSwagTypeNameGeneratorType>
<NSwagPropertyNameGeneratorType>$(NSwagPropertyNameGeneratorType)</NSwagPropertyNameGeneratorType>
<NSwagEnumNameGeneratorType>$(NSwagEnumNameGeneratorType)</NSwagEnumNameGeneratorType>
<NSwagServiceHost>$(NSwagServiceHost)</NSwagServiceHost>
<NSwagServiceSchemes>$(NSwagServiceSchemes)</NSwagServiceSchemes>
<NSwagOutput>$(NSwagOutput)</NSwagOutput>
<NSwagNewLineBehavior>$(NSwagNewLineBehavior)</NSwagNewLineBehavior>
</OpenApiProjectReference>
</ItemDefinitionGroup>
</Project>
Loading

0 comments on commit b7190d9

Please sign in to comment.