- 
                Notifications
    You must be signed in to change notification settings 
- Fork 64
          Adds support for configuring the default value of derived types' @odata.type property
          #307
        
          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
Conversation
        
          
                src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSchemaGenerator.cs
              
                Outdated
          
            Show resolved
            Hide resolved
        
      Co-authored-by: Vincent Biret <[email protected]>
Co-authored-by: Vincent Biret <[email protected]>
Co-authored-by: Vincent Biret <[email protected]>
Co-authored-by: Vincent Biret <[email protected]>
Co-authored-by: Vincent Biret <[email protected]>
…into fix/is/odatatype-default-value
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for taking the changes, one last thing
        
          
                src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSchemaGenerator.cs
              
                Outdated
          
            Show resolved
            Hide resolved
        
      | 
 From the issue description written by @andrueastman, I understood that we should check whether the type derives from an abstract type alongside the other 2 listed checks, else, we generate the  | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for taking the changes
Fixes #304
This PR:
defaultvalue of the@odata.typeproperty in the schema of derived types.defaultvalue. The default value istrue, meaning the default value will always be emitted. Iffalsethe value will be set conditionally based on whether the derived type's base type is abstract (and not entity) and is referenced in the properties of a structural property or an action.