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

Add option to allow not including the examples #68

Closed
darrelmiller opened this issue Jun 3, 2020 · 6 comments · Fixed by #73
Closed

Add option to allow not including the examples #68

darrelmiller opened this issue Jun 3, 2020 · 6 comments · Fixed by #73
Assignees

Comments

@darrelmiller
Copy link
Member

darrelmiller commented Jun 3, 2020

The generated examples are not very useful as they don't contain representative values and in some cases the values actually don't match the datatypes so they cause warnings and errors with linting tools. They also considerably bulk up the output document.

Consider this example. It doesn't provide any more information than the schema itself.

      example:
        serialNumber: string
        totalStorageSpace: integer
        deviceGuardLocalSystemAuthorityCredentialGuardState: '@odata.type': microsoft.graph.deviceGuardLocalSystemAuthorityCredentialGuardState	          
        osBuildNumber: string
        operatingSystemProductType: integer

The other consideration is to just stop producing examples completely. If we keep them we should consider actually generating representative sample values.

@xuzhg
Copy link
Contributor

xuzhg commented Jun 3, 2020

@darrelmiller do you have resource to work it?

@darrelmiller
Copy link
Member Author

darrelmiller commented Jun 3, 2020

@xuzhg Yes, I can work with @irvinesunday on this.

#AB4906

@xuzhg
Copy link
Contributor

xuzhg commented Jun 3, 2020

@darrelmiller, great, i'd love to review it.

@unchase
Copy link

unchase commented Jul 21, 2020

Hi, @xuzhg
When will you release this changes into the nuget package?

@xuzhg
Copy link
Contributor

xuzhg commented Jul 21, 2020

@unchase, it's out on nuget.org, you can find it at: https://www.nuget.org/packages/Microsoft.OpenApi.OData/1.0.4

Let me know if anything is wrong.

@unchase
Copy link

unchase commented Jul 22, 2020

@unchase, it's out on nuget.org, you can find it at: https://www.nuget.org/packages/Microsoft.OpenApi.OData/1.0.4

Let me know if anything is wrong.

Thank you. All is good.

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

Successfully merging a pull request may close this issue.

4 participants