Giter VIP home page Giter VIP logo

Comments (4)

captainsafia avatar captainsafia commented on July 28, 2024

@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.

baywet avatar baywet commented on July 28, 2024

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.

captainsafia avatar captainsafia commented on July 28, 2024

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.

baywet avatar baywet commented on July 28, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.