microsoftgraph/MSGraph-SDK-Code-Generator

CSDL source used for generation of OpenAPI documents needs to be selected conditionally

irvinesunday opened this issue · 0 comments

Generating OpenAPI documents for the openapi.yaml document uses the CSDL: cleanMetadataWithDescriptionsAndAnnotationsAndErrorsv1.0.xml and cleanMetadataWithDescriptionsAndAnnotationsAndErrorsbeta.xml. The other OpenAPI documents use: cleanMetadataWithDescriptionsAndAnnotationsbeta and cleanMetadataWithDescriptionsAndAnnotationsv1.0.xml. The current script for generate-open-api.ps1 uses the former as the source to generate all OpenAPI documents.

$inputFile = Join-Path "./" "clean_$($cleanVersion)_metadata" "cleanMetadataWithDescriptionsAndAnnotationsAndErrors$endpointVersion.xml"

We need to update the script so that we only generate the openapi.yaml document from the ...AndErrorsv1.0.xml and ...AndErrorsbeta.xml. This is the OpenAPI document used by Kiota.