microsoftgraph / msgraph-metadata

Microsoft Graph metadata captured and used for generating client library code files.
https://graph.microsoft.com
MIT License
107 stars 33 forks source link

Unable to parse openapi.yaml file with hidi #646

Closed gmantri closed 5 months ago

gmantri commented 5 months ago

I am trying to parse openapi.yaml using hidi but unable to do so. Even the validation is failing.

Here's the command I am using for validation:

dotnet hidi validate -d openapi.yaml

and this is the output I am getting:

fail: Microsoft.OpenApi.Hidi.Handlers.ValidateCommandHandler[0]
      => Parsing OpenAPI: openapi.yaml => Detected errors
      Detected error during parsing: The field 'description' in 'response' object is REQUIRED. [#/paths/~1identity~1authenticationEventsFlows~1{authenticationEventsFlow-id}~1graph.externalUsersSelfServiceSignUpEventsFlow~1onAttributeCollection~1graph.onAttributeCollectionExternalUsersSelfServiceSignUp/get/responses/2XX/description]
fail: Microsoft.OpenApi.Hidi.Handlers.ValidateCommandHandler[0]
      => Parsing OpenAPI: openapi.yaml => Detected errors
      Detected error during parsing: The field 'description' in 'response' object is REQUIRED. [#/paths/~1identity~1authenticationEventsFlows~1{authenticationEventsFlow-id}~1graph.externalUsersSelfServiceSignUpEventsFlow~1onAuthenticationMethodLoadStart~1graph.onAuthenticationMethodLoadStartExternalUsersSelfServiceSignUp/get/responses/2XX/description]
info: Microsoft.OpenApi.Hidi.Handlers.ValidateCommandHandler[0]
      => Calculating statistics
      Path Items: 10046
      Operations: 15538
      Parameters: 36729
      Request Bodies: 5219
      Responses: 15538
      Links: 0
      Callbacks: 0
      Schemas: 80793

I am getting the same error when I try use the transform parameter. My goal is to extract some endpoints from this yaml file.

andrueastman commented 5 months ago

Thanks for raising this @gmantri

This is being looked into at https://github.com/microsoft/OpenAPI.NET.OData/pull/547. So we'll close this for now so that this is tracked via https://github.com/microsoft/OpenAPI.NET.OData/issues/546 in the library producing the document.