parent
396c54d874
commit
2ea746f37d
|
|
@ -57,6 +57,14 @@
|
|||
Condition="'$(OpenApiCodeDirectory)' == ''">$(BaseIntermediateOutputPath)</OpenApiCodeDirectory>
|
||||
</PropertyGroup>
|
||||
|
||||
<!--
|
||||
Well-known metadata of the code generator item groups.
|
||||
-->
|
||||
<ItemGroup>
|
||||
<AvailableItemName Include="OpenApiReference" />
|
||||
<AvailableItemName Include="OpenApiProjectReference" />
|
||||
</ItemGroup>
|
||||
|
||||
<!--
|
||||
Well-known metadata of the code generator item groups.
|
||||
-->
|
||||
|
|
|
|||
|
|
@ -11,6 +11,12 @@
|
|||
</GenerateOpenApiCodeDependsOn>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PropertyPageSchema Include="$(MSBuildThisFileDirectory)OpenApiItemsSchema.xaml">
|
||||
<Context>File;BrowseObject</Context>
|
||||
</PropertyPageSchema>
|
||||
</ItemGroup>
|
||||
|
||||
<!-- OpenApiProjectReference support. -->
|
||||
|
||||
<ItemGroup Condition=" '$(OpenApiBuildReferencedProjects)' == 'true' ">
|
||||
|
|
|
|||
|
|
@ -0,0 +1,179 @@
|
|||
<ProjectSchemaDefinitions xmlns="http://schemas.microsoft.com/build/2009/properties">
|
||||
<ContentType Name="OpenApiReference"
|
||||
DisplayName="OpenApi file reference"
|
||||
ItemType="OpenApiReference" />
|
||||
|
||||
<ContentType Name="OpenApiProjectReference"
|
||||
DisplayName="OpenApi project reference"
|
||||
ItemType="OpenApiProjectReference" />
|
||||
|
||||
<ItemType Name="OpenApiReference"
|
||||
DisplayName="OpenApi File Reference" />
|
||||
|
||||
<ItemType Name="OpenApiProjectReference"
|
||||
DisplayName="OpenApi Project Reference" />
|
||||
|
||||
<Rule Name="OpenApiReference"
|
||||
DisplayName="File Properties"
|
||||
PageTemplate="generic"
|
||||
Description="File Properties"
|
||||
OverrideMode="Extend">
|
||||
<Rule.DataSource>
|
||||
<DataSource Persistence="ProjectFile" Label="Configuration" ItemType="OpenApiReference"
|
||||
HasConfigurationCondition="false" SourceOfDefaultValue="AfterContext" />
|
||||
</Rule.DataSource>
|
||||
|
||||
<Rule.Categories>
|
||||
<Category Name="Advanced" DisplayName="Advanced" />
|
||||
<Category Name="CodeGen" DisplayName="Code Generation" />
|
||||
<Category Name="Misc" DisplayName="Misc" />
|
||||
</Rule.Categories>
|
||||
|
||||
<DynamicEnumProperty Name="{}{ItemType}" DisplayName="Build Action" Category="Advanced"
|
||||
Description="How the file relates to the build and deployment processes."
|
||||
EnumProvider="ItemTypes" />
|
||||
|
||||
<StringProperty Name="Identity" Visible="false" ReadOnly="true">
|
||||
<StringProperty.DataSource>
|
||||
<DataSource Persistence="Intrinsic" ItemType="OpenApiReference"
|
||||
PersistedName="Identity" SourceOfDefaultValue="AfterContext" />
|
||||
</StringProperty.DataSource>
|
||||
</StringProperty>
|
||||
|
||||
<StringProperty Name="FullPath"
|
||||
DisplayName="Full Path"
|
||||
ReadOnly="true"
|
||||
Category="Misc"
|
||||
Description="Location of the file.">
|
||||
<StringProperty.DataSource>
|
||||
<DataSource Persistence="Intrinsic" ItemType="OpenApiReference"
|
||||
PersistedName="FullPath" SourceOfDefaultValue="AfterContext" />
|
||||
</StringProperty.DataSource>
|
||||
</StringProperty>
|
||||
|
||||
<StringProperty Name="FileNameAndExtension"
|
||||
DisplayName="File Name"
|
||||
ReadOnly="true"
|
||||
Category="Misc"
|
||||
Description="Name of the file.">
|
||||
<StringProperty.DataSource>
|
||||
<DataSource Persistence="Intrinsic" ItemType="OpenApiReference"
|
||||
PersistedName="FileNameAndExtension" SourceOfDefaultValue="AfterContext" />
|
||||
</StringProperty.DataSource>
|
||||
</StringProperty>
|
||||
|
||||
<BoolProperty Name="Visible" Visible="false" Default="true" />
|
||||
|
||||
<StringProperty Name="DependentUpon" Visible="false">
|
||||
<StringProperty.Metadata>
|
||||
<NameValuePair Name="DoNotCopyAcrossProjects" Value="true" />
|
||||
</StringProperty.Metadata>
|
||||
</StringProperty>
|
||||
|
||||
<StringProperty Name="Link" Visible="false">
|
||||
<StringProperty.DataSource>
|
||||
<DataSource SourceOfDefaultValue="AfterContext" />
|
||||
</StringProperty.DataSource>
|
||||
<StringProperty.Metadata>
|
||||
<NameValuePair Name="DoNotCopyAcrossProjects" Value="true" />
|
||||
</StringProperty.Metadata>
|
||||
</StringProperty>
|
||||
|
||||
<StringProperty Name="ClassName" DisplayName="Class Name"
|
||||
Category="CodeGen"
|
||||
Description="Name of the generated class.">
|
||||
<StringProperty.DataSource>
|
||||
<DataSource ItemType="OpenApiReference" SourceOfDefaultValue="AfterContext"
|
||||
PersistenceStyle="Attribute" />
|
||||
</StringProperty.DataSource>
|
||||
</StringProperty>
|
||||
|
||||
<StringProperty Name="Namespace" DisplayName="Namespace"
|
||||
Category="CodeGen"
|
||||
Description="Namespace to place the generated class in.">
|
||||
<StringProperty.DataSource>
|
||||
<DataSource ItemType="OpenApiReference" SourceOfDefaultValue="AfterContext"
|
||||
PersistenceStyle="Attribute" />
|
||||
</StringProperty.DataSource>
|
||||
</StringProperty>
|
||||
|
||||
<StringProperty Name="Options" DisplayName="Generator options"
|
||||
Category="CodeGen"
|
||||
Description="Options to pass to the code generator.">
|
||||
<StringProperty.DataSource>
|
||||
<DataSource ItemType="OpenApiReference" SourceOfDefaultValue="AfterContext"
|
||||
PersistenceStyle="Attribute" />
|
||||
</StringProperty.DataSource>
|
||||
</StringProperty>
|
||||
</Rule>
|
||||
|
||||
<Rule Name="OpenApiProjectReference"
|
||||
DisplayName="File Properties"
|
||||
PageTemplate="generic"
|
||||
Description="File Properties"
|
||||
OverrideMode="Extend">
|
||||
<Rule.DataSource>
|
||||
<DataSource Persistence="ProjectFile" Label="Configuration" ItemType="OpenApiProjectReference"
|
||||
HasConfigurationCondition="false" SourceOfDefaultValue="AfterContext" />
|
||||
</Rule.DataSource>
|
||||
|
||||
<Rule.Categories>
|
||||
<Category Name="Advanced" DisplayName="Advanced" />
|
||||
<Category Name="CodeGen" DisplayName="Code Generation" />
|
||||
<Category Name="Misc" DisplayName="Misc" />
|
||||
</Rule.Categories>
|
||||
|
||||
<DynamicEnumProperty Name="{}{ItemType}" DisplayName="Build Action" Category="Advanced"
|
||||
Description="How the file relates to the build and deployment processes."
|
||||
EnumProvider="ItemTypes" />
|
||||
|
||||
<StringProperty Name="Identity" Visible="false" ReadOnly="true">
|
||||
<StringProperty.DataSource>
|
||||
<DataSource Persistence="Intrinsic" ItemType="OpenApiProjectReference"
|
||||
PersistedName="Identity" SourceOfDefaultValue="AfterContext" />
|
||||
</StringProperty.DataSource>
|
||||
</StringProperty>
|
||||
|
||||
<StringProperty Name="FullPath"
|
||||
DisplayName="Full Path"
|
||||
ReadOnly="true"
|
||||
Category="Misc"
|
||||
Description="Location of the project file.">
|
||||
<StringProperty.DataSource>
|
||||
<DataSource Persistence="Intrinsic" ItemType="OpenApiProjectReference"
|
||||
PersistedName="FullPath" SourceOfDefaultValue="AfterContext" />
|
||||
</StringProperty.DataSource>
|
||||
</StringProperty>
|
||||
|
||||
<StringProperty Name="FileNameAndExtension"
|
||||
DisplayName="File Name"
|
||||
ReadOnly="true"
|
||||
Category="Misc"
|
||||
Description="Name of the project file.">
|
||||
<StringProperty.DataSource>
|
||||
<DataSource Persistence="Intrinsic" ItemType="OpenApiProjectReference"
|
||||
PersistedName="FileNameAndExtension" SourceOfDefaultValue="AfterContext" />
|
||||
</StringProperty.DataSource>
|
||||
</StringProperty>
|
||||
|
||||
<BoolProperty Name="Visible" Visible="false" Default="true" />
|
||||
|
||||
<StringProperty Name="Namespace" DisplayName="Namespace"
|
||||
Category="CodeGen"
|
||||
Description="Namespace to place the generated classes in.">
|
||||
<StringProperty.DataSource>
|
||||
<DataSource ItemType="OpenApiProjectReference" SourceOfDefaultValue="AfterContext"
|
||||
PersistenceStyle="Attribute" />
|
||||
</StringProperty.DataSource>
|
||||
</StringProperty>
|
||||
|
||||
<StringProperty Name="Options" DisplayName="Generator options"
|
||||
Category="CodeGen"
|
||||
Description="Options to pass to the code generator.">
|
||||
<StringProperty.DataSource>
|
||||
<DataSource ItemType="OpenApiProjectReference" SourceOfDefaultValue="AfterContext"
|
||||
PersistenceStyle="Attribute" />
|
||||
</StringProperty.DataSource>
|
||||
</StringProperty>
|
||||
</Rule>
|
||||
</ProjectSchemaDefinitions>
|
||||
|
|
@ -1,5 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||
<Project>
|
||||
<ItemGroup>
|
||||
<PropertyPageSchema Include="../build/OpenApiItemsSchema.xaml">
|
||||
<Context>File;BrowseObject</Context>
|
||||
</PropertyPageSchema>
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="GenerateOpenApiCode">
|
||||
<MSBuild Projects="$(MSBuildProjectFile)"
|
||||
Targets="GenerateOpenApiCode"
|
||||
|
|
|
|||
Loading…
Reference in New Issue