Apicurio-studio: Editor: Support allOf (data type inheritance)

Created on 18 Jul 2018  ·  20Comments  ·  Source: Apicurio/apicurio-studio

Would be nice to model inheritance as defined in https://swagger.io/docs/specification/data-models/inheritance-and-polymorphism/ with allOf

enhancement

Most helpful comment

Hoping for this feature to be implemented!

All 20 comments

@EricWittmann having spent the last couple days in the tool, this is probably the biggest gap preventing me from using the tool with customers

Ok. Adding it to the list!

any further thought on this? I'm getting reading to start some projects and I'd love to use apicruio but this issue is a real blocker

I have had some thoughts in this area but haven't had a chance to really work on it. The feature backlog is pretty extensive, including a relatively widespread renovation of the UX.

Any chance you had some thoughts around what a UI that supported allOf (and presumably oneOf and anyOf) might look like?

allOf needs to show me that definition foo extends definition bar and preferably an enumeration of fields that are part of bar. the view of foo should hyperlink to bar. I'm imagining a split screen of sorts here, but UI design is not my strength.

oneOf and anyOf are different use cases from a UX standpoint. In those scenarios, I need to simply enumerate the definitions that could be used when assigning a variable, but I do not need to see the details of the definitions like is needed in allOf. I just need to know the list of definition names.

I'll raise the issue with UX to see if we can come up with something. Unfortunately it probably isn't the highest item on the to-do list, but I'll do my best. :)

Understood, I just want you to have context as to what is requried for us to use this thing in the lab. This is the biggie right now - I can work around most other things. But I need to be able to do inheritance in a real world project.

Absolutely understood. :) I'll push up this requirement as much as possible - I certainly would like Apicurio to be as useful as possible in real-world projects.

If you have other issues that you haven't yet mentioned that can be improved - definitely let me know about those as well. (Note: We're working on designing a CRUD feature, which will make it much easier to quickly add standard operations for a "resource")

Hello, any news on this? It is a pitty that such a good tool cannot deal with inheritance...

Unfortunately nothing yet, although not for a lack of desire to support inheritance. Just a prioritization issue, really.

What would help a lot, if anyone has UX design skills, is a mockup of how this would work. @sherl0cks already provided some ideas, but it would be much easier to implement something here with a UX design. OR if you have a tool that does something similar in a way you like, feel free to point that out!

I realize that might be a lot to ask. :)

Either way, this will get done I just don't quite know when yet.

Hey,

if UX part is still a blocker - why not to reuse existing tab style like https://imagebin.ca/v/4mkbz35931av

Alternative - create "composite" data type (next to array, string, float, ...), once selected - render the same form (where you can add various types) with some padding on the left.

p.s. inheritance is a killer OpenApi documentation feature as it saves a lot of copy - pasting!

That's not a bad design! Thanks for the contribution. Hopefully you're OK with this, but I thought it would be useful to inline the image to make things easier (no need to click out to imagebin):

4mkbz35931av

Nah, I'll wait till this gets released and then I'll claim for copyright infringement! :D

p.s. other than that - you guys built a great tool! Congrats!

Ha ha! 🤣

Hoping for this feature to be implemented!

Working on this now (finally). :)

I know it's taken a long time, but an initial implementation of basic allOf, oneOf, and anyOf support (obviously for OpenAPI 2.0 docs it's only "allOf").

This is just a beta implementation of the support. I'd love to get some feedback on it. I think there are a bunch of improvements that can be made, but I'm interested in what others think first.

I'll be doing a release today so that everyone can test out the features using the Try Now (cloud) version of Apicurio Studio.

It's worth noting that the changes also include improvements to re-usable simple types. Hopefully that is also something helpful to some users.

Unfortunately no long in a role where I'm using apicurio, but this sounds great @EricWittmann !

Was this page helpful?
0 / 5 - 0 ratings