-
Notifications
You must be signed in to change notification settings - Fork 232
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
Support in-memory only metadata dictionary in OpenAPI object model #1719
Comments
@baywet @MaggieKimani1 @darrelmiller Any thoughts on the API shape proposed here? I know the library makes extensive use of interfaces for things like this but it strikes me that using a base class would reduce the implementation overhead. With regard to what classes will extend
|
From what I remember from this code base, having a base class would go against the general design. From a scenario perspective I'm not sure I understand what you'd expect OAS.net to do with that property bag besides storing it in memory? |
Good idea! An interface with a default property implementation can help fill the gap here. My other conondrum was more bike-sheddy. A lot of the interfaces already defined have end in some sort of
Yep, just store it in-memory. It's only there to provide a space for consumers of the object model to do book-keeping on instances within the object model. To elaborate on the ASP.NET Core scenario I described above, we'd use the property pag to store a unique identifier on a given |
Thanks for the additional context! For the name : IPropertyBagStorable? ugly, but explicit What would you expect to happen with copy constructors? reference copy or deep copy? |
Is your feature request related to a problem? Please describe.
Currently, all properties within the OpenAPI object model are serialized to the output as part of the OpenAPI writer implementation. This makes it difficult to manage temporary state associated with the in-memory OpenAPI model. For example, ASP.NET Core needs to correlate a given OpenApiOperation with a unique identifier for each endpoint recognized by the framework.
Describe the solution you'd like
The OpenAPI object model should support some sort of property bag that allows users to manage metadata associated with an object model in-memory without having to worry about information in this property bag being serialized.
Describe alternatives you've considered
Currently, ASP.NET Core works around this limitation by storing the metadata in the
Extensions
property onOpenApiSchema
andOpenApiOperation
then scrubbing this metadata out from the in-memory model before it is serialized. This presents a couple of issues:OpenApiAny
implementersThe text was updated successfully, but these errors were encountered: