Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discriminator mapping refers to missing property #242

Closed
andrueastman opened this issue Jun 28, 2022 · 1 comment
Closed

Discriminator mapping refers to missing property #242

andrueastman opened this issue Jun 28, 2022 · 1 comment

Comments

@andrueastman
Copy link
Member

Latest update of the conversion library includes adding some discriminator mappings to the openApi document. Possibly related to
changes fixing #233

Taking a look at the previous description of the apiAuthenticationConfigurationBase

    microsoft.graph.apiAuthenticationConfigurationBase:
      title: apiAuthenticationConfigurationBase
      type: object

And the new description

    microsoft.graph.apiAuthenticationConfigurationBase:
      title: apiAuthenticationConfigurationBase
      type: object
      discriminator:
        propertyName: '@odata.type'
        mapping:
          '#microsoft.graph.basicAuthentication': '#/components/schemas/microsoft.graph.basicAuthentication'
          '#microsoft.graph.clientCertificateAuthentication': '#/components/schemas/microsoft.graph.clientCertificateAuthentication'
          '#microsoft.graph.pkcs12Certificate': '#/components/schemas/microsoft.graph.pkcs12Certificate'

The discriminator mapping mentions the propertyName @odata.type but the property collection (this instance has no properties) does not contain the property @odata.type.

This leads to validation errors as described in microsoft/kiota#1668.

The conversion library should probably make sure sure the property exists before adding the mapping.

@andrueastman
Copy link
Member Author

Duplicated issue of #243

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant