Authress-Engineering / openapi-explorer

OpenAPI Web component to generate a UI from the spec.
Apache License 2.0
292 stars 42 forks source link

Schema representation improvements #253

Closed zlondrej closed 1 month ago

zlondrej commented 1 month ago

I made some changes to the way schemas are visualized to better fit my use cases, but I think they're more general use cases and are in-line with what OpenAPI is describing.

image

I also added new schema-compact-single-x-of-option option for more compact display of single item xxxOf. It would be better to move the schema link to the type column, but internal representation is a too messy for that and I can't spend that much extra time on it, as that would require substantial rewrite.

image

Additional details can be found in the documentation and changelog.

wparad commented 1 month ago

I'm concerned that there is just too much going on in this PR in order to test, validate, and review it effectively. Can you split this and start with just the smallest one change you consider to be most important, and then we can work on it from there?

Right now I have too many questions and the individuals discussions are going to get conflated as we try to discuss each one.

zlondrej commented 1 month ago

Well, I was expecting this a bit but it was worth a try. I will try to split them once I have some more time to spare on this.

wparad commented 1 month ago

Well, I was expecting this a bit but it was worth a try. I will try to split them once I have some more time to spare on this.

Sorry. Fwiw, there about 70% which is great, and 30% I have concerns with. Maybe PR everything that's refactoring, and open issues for the functional changes where we can discuss each one. In general, we like to avoid:

Instead optimize for:

wparad commented 1 month ago

Closing in favor of smaller PRs. Looking forward to them.