Comments (4)
@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 OpenApiHasPropertyBag
, I'm thinking that we should start with:
- OpenApiDocument
- OpenApIPath
- OpenApiOperation
- OpenApiSchema
from openapi.net.
From what I remember from this code base, having a base class would go against the general design.
The extensive use of interfaces for every facet has been the design here.
I wonder if interface default implementations could help us get the best of both here?
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?
from openapi.net.
I wonder if interface default implementations could help us get the best of both here?
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 ble
suffix (Extensible, Serializable, Referenceable). I couldn't think of a good one for this but I'm open to ideas.
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?
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 OpenApiOperation
instance that acts as a join ID with the ActionDescriptor
concept in ASP.NET Core so we can link the OpenApiOperation instance with the framework type associated with it.
from openapi.net.
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?
from openapi.net.
Related Issues (20)
- Parameters defined using a `$ref` are not included in the OpenApiPathItem.Parameters collection HOT 1
- Relative reference in subdirectory OpenApi document fails to load
- No error when deserializing a wrong reference. HOT 1
- extension parsing mechanism should not fail if the extension returns null
- Extending an Operation Parent in Minimal API for Power Apps Webhooks
- Examples with complex nested structure and json node value as null is not getting parsed
- Attributes are moved to allOf instead of in the root of an object after updating Swashbuckle.AspNetCore from 6.5.0 to 6.6.2
- AsParameters not lifting Container type of properties HOT 4
- Avoid use of unbounded reflection to resolve Enum display names HOT 5
- High-level documentation about "lossiness" of 3.0 to 2.0 downcasting
- Implement native JSON schema support HOT 2
- Parsing scientific notation is failing for integer fields
- OpenApiFilterService.CreateFilteredDocument fails if the document is missing the "components" field HOT 3
- Add a JSON schema model class with all known keywords
- Read Fails with System.ArgumentNullException: 'Value cannot be null. Parameter name: encoding' HOT 1
- Data and type mismatch found if a string happens to parse as a specific type HOT 1
- OpenAPI v3.1.0 compliance
- Incorrect parsing of Explode property when parsing a Swagger 2.0 spec
- Recent version broke enums with oneOf which is part of the standard HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openapi.net.