Skip to content

Conversation

@kael-shipman
Copy link

This plugin addresses the Hierarchical Tags idea specified in swagger-api/swagger-ui#5969. See that issue for more information.

@kael-shipman
Copy link
Author

Hey @shockey cc @mathis-m,

This is my first swagger plugin and my first attempt at anything React, so I'm looking for a little input. The plugin currently seems to work, although I'm very new to all of this, so it may be far from ideal.

Would one or both of you mind grabbing a quick look at it? You should be able to just clone the repo, cd into packages/hierarchical-tags, run npm start, then go to http://localhost:8080 and it should all show up correctly. (I've committed the build to the example folder and am otherwise using standard unpkg libs.)

I have a few specific questions:

  1. I'd like some general comments and suggestions if you see anything that I did that's weird or potentially problematic. I reserve the right to disagree :), but I've got a lot to learn about this and would welcome the input.
  2. Please give me a push in the right direction regarding styling. l added some basic in-line styling, but my thought is that people are going to want some control over how the hierarchy is displayed, and I'm not sure how to offer that.
  3. Is there a way to pass plugin-specific options? That way we could just let people pass styles in as an option. I'd also like to give them the opportunity to change the hierarchy delimiter regex.

* Fixes #2
* Adds new optional config, `hierarchicalTagSeparator` (defaults to
  `/[:|]`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants