microsoft / OpenAPI.NET

The OpenAPI.NET SDK contains a useful object model for OpenAPI documents in .NET along with common serializers to extract raw OpenAPI JSON and YAML documents from the model.
MIT License
1.4k stars 233 forks source link

Extension mechanism is broken #411

Closed Cloudmersive closed 5 years ago

Cloudmersive commented 5 years ago

Just want to add "x-ms-summary" (which ironically is Microsoft-based) to a Parameter but the AddExtension mechanism requires me to write a whole IOpenApiExtension class and go through a writer. I just want to add custom key/value pairs.

Cloudmersive commented 5 years ago

This is how it should be done for reference: https://github.com/tavis-software/Tavis.OpenApi/blob/master/src/OpenApi/Model/Parameter.cs

khellang commented 5 years ago

Can't you just do .AddExtension("x-ms-summary", new OpenApiString("blah"))?

darrelmiller commented 5 years ago

I'm going to assume this is the fault of me not actually writing any documentation for this library. I really should do that. I'm going to close this issue and @Cloudmersive can you let me know if this is still an issue for you?