-
Notifications
You must be signed in to change notification settings - Fork 9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tag content always expanded #2799
Comments
Yes, it's noted in the Known Issues that most configuration options are not implemented yet. |
For everyone who's interested in this feature (I imagine users will come here from the closed issues as well). We understand the importance of this feature, however at the moment, we can't prioritize it very high (just limited resources). It would be great if anyone would attempt to submit a PR to add this functionality. I'm aware that our documentation is (very) lacking, but hopefully for those of you who know your javascript, following how some of the other configs work, would at least give you a hint as to what should be changed. If you have specific questions, we'll definitely try to help. We're also in the process of writing up some guidelines to submitting PRs, that would help you and us in the process, but that shouldn't stop you from making changes. The basics are - make sure to add tests and if you need to add a distributed dependency, check with us first. We appreciate all the help we'll get, as I'm sure other users of this project. We'll do our best to review PRs as soon as possible, and make the process iterative as needed. |
do you have dev setup instructions anywhere |
As mentioned, the documentation is lacking. Whatever is available can be found in the README. |
Thanks @webron for the update (and consolidating the issues). |
Never worked with docker. Installed. Ran its "hello world". Executed this
(81, because my IIS is using 80) "http://localhost:81/" displays the familiar "Swagger Petstore" (btw, it looks like v2). I'm on Windows 10. My Hyper-V Manager is showing "MobyLinuxVM": I'm guessing this is the VM that contains the running swagger-ui site. Double-clicking that doesn't take me much further from "Connecting to 'MobyLinuxVM'" message, though (I had it sitting there for 10+ min). I had some exposure to nodejs in the past, know my way around JS. I can't locate swagger-ui files to start editing. Or, is this just to run a precompiled and pre-installed version of swagger-ui in a docker VM? Should I not be downloading the source to my local drive using git.exe, and then install dependencies via npm.exe, and run it using node.exe (then edit, test, push branch, create PR, etc)? |
You don't need docker to develop. It's just https://github.com/swagger-api/swagger-ui#how-to-run. |
OK, works (finally). So, to clarify: what's the requirement again? To display tags collapsed/uncollapsed, driven by a setting, that would be fed to Still not promising that this will work out, but I'll try. |
Nope; sorry: based on hints that I see around, this is all React syntax, which is beyond me. I was able to find that the relevant logic is in /src/core/components/operations.jsx ("is-open"; within the massive return statement), but I can't figure out how to wire that up with anything external. I don't even know how to debug this thing :( Which IDE are you using? |
@hlubovac these days I'm using vscode for pretty much all development unless I have to use something else. I tried even just changing the "isOpen" logic to just return false to see what would happen, but it seemed to have no effect at all, so I think there is some development step I was missing to get it to rebuild. |
I did the following steps to make that run:
That path was just my choice, within a folder that I named "projects" :). Also the "working" branch name.
That took a while. Close to 900 folders within
That also isn't super quick. It seems that everything is getting "compiled" (transformed) from this JSX syntax to nodejs language. I didn't look around to see where the produced nodejs files get dumped (likely After that, http://localhost:3200 was showing v3 version of Petstore. This compilation process seems to repeat each time I stop/start the service. But, then I also discovered that changes done within JSX files quickly get propagated all the way to the browse (I could see this in browser's console; no clue what mechanism is being used for this). So, I was able to see that my test change (I added a bogus value within quotes for So, hopefully that helps, if you know your way around React :) I'm coding in VS, so I loaded all these files into an empty project, just to that I can browse and search quickly (as opposed to using Notepad :)), but that's irrelevant. VS doesn't provide any debugging features out-of-box for this lingo. |
@hlubovac thanks for that, yes I can see that as well. I wasn't accustomed to how this reloading was working - I guess I was expecting to see it reload. OK I'll play around and see if I can affect the logic in any way |
I just added a comment to #2710 as it being irrelevant to v3. So, not that one. I wasn't aware of #1919, so not that one either. I was trying to see if I'll be able to figure out a solution for this particular one (#2799), to have the "tag" content initially collapsed, driven by a startup setting, like this: But, unfortunately, I don't know how to work with these code files (and I can't find time to get started at the moment), so I'm a fluke. :) |
@hlubovac please try out my PR, I think it solves the issue |
I downloaded your doc-expansion branch, and I see the change, but - which file did you add this to: |
Sorry, after I went to lunch I realised that wouldn't be clear. Just add it to the bundle config like so:
|
I added a comment to your PR. Hopefully it meets their standards. Thank you! |
@gwynjudd works perfect! |
docExpansion: "none"
from v2 didn't workThe text was updated successfully, but these errors were encountered: