Skip to content
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

Develop NASA/PDS Skin for Search API Swagger interface #194

Closed
Tracked by #30
jordanpadams opened this issue Jun 9, 2022 · 23 comments
Closed
Tracked by #30

Develop NASA/PDS Skin for Search API Swagger interface #194

jordanpadams opened this issue Jun 9, 2022 · 23 comments
Assignees
Labels

Comments

@jordanpadams
Copy link
Member

💡 Description

Details TBD with help/input from @tloubrieu-jpl @jimmie for documentation on how to update this.

@tloubrieu-jpl
Copy link
Member

@tloubrieu-jpl will provide inputs he found on the web

@tloubrieu-jpl
Copy link
Member

tloubrieu-jpl commented Jun 14, 2022

@c-suh @al-niessner

To change the skin of the swagger-ui page, here is the procedure I was thinking of from what I search online:

@c-suh
Copy link

c-suh commented Jun 30, 2022

@tloubrieu-jpl, @jordanpadams, @viviant100, or @jimmie, is there documentation somewhere on where we have these deployed or how to do it locally? I found personal notes on how to connect to the validation API on dev 3 via ssh tunnel, but I'm getting "Connection refused" messages inn my terminal. I also searched through our internal wiki but have missed it if it's there. Thank you in advance!

@jordanpadams
Copy link
Member Author

@c-suh I think you just need to spin up the registry API: https://github.com/NASA-PDS/registry-api/blob/main/README.md#build, but I don't know what the URL is on localhost once it is running...

@tloubrieu-jpl
Copy link
Member

@c-suh I just merged an update of registry-api in branch https://github.com/NASA-PDS/registry-api/tree/release/1.0.1 which fixes the swagger-ui page.

@tloubrieu-jpl
Copy link
Member

@c-suh is having difficulties with using the docker compose on her laptop. opensearch is exited.

@c-suh
Copy link

c-suh commented Jul 12, 2022

During breakout, have figured out how to get elasticsearch running. Have instructions on how to get dev environment set up and will be attempting that.

@c-suh
Copy link

c-suh commented Jul 14, 2022

Have successfully run mvn clean install with registry-api with jdk11 (attempt with jdk17 failed) and started spring-boot. Am now locating files for the page.

@c-suh
Copy link

c-suh commented Jul 26, 2022

Am momentarily delayed by having to set up environments on another laptop.

@c-suh
Copy link

c-suh commented Aug 8, 2022

Got everything set up again then was sidetracked by other tasks. Am back on this and have finally got the swagger-ui showing. There was an issue caused by a mismatch between registry-api-model and registry-api-service in their springfox-version. Have noticed that the swagger-ui for this is different from that which shows with registry's int-registry-service-loader and will ask at tomorrow's meeting if this should be addressed.

@c-suh
Copy link

c-suh commented Aug 25, 2022

Back from vacation and being sick. Issue mentioned above is now null because Al fixed it. Getting back on track with original task.

@jimmie
Copy link
Member

jimmie commented Sep 1, 2022

Further investigation on behavior prior to making changes.

@c-suh
Copy link

c-suh commented Sep 9, 2022

I think I've finally managed to piece together some understanding of how this works. I've disabled springfox 3's default swagger-ui and have my own swagger-ui files running with the application. Next steps are to find an optimal place to change the logo and styling, package these into a jar, integrate this into maven's build process, and to verify that I haven't compromised any use of swagger's security that the other developers may be making use of.

@jordanpadams
Copy link
Member Author

@c-suh let us know if you need any assistance. it would be great if this could be done by our sprint review next Thursday.

@c-suh
Copy link

c-suh commented Sep 13, 2022

There seem to be 2 methods:

  • disabling springfox documentation, dropping in contents of swagger-ui repo, and resource mapping to use those files
  • using springfox documentation, unpacking the springfox-swagger-ui jar, and overwriting a few relevant files
    I'm not sure of the advantage of the latter option, and I have the former working (latter is only partially working). Have talked with Jimmie and the decision is to continue with the working route and get a better idea of what exactly can be customized and not (e.g. footer, menu button).

c-suh added a commit to NASA-PDS/registry-api that referenced this issue Sep 16, 2022
changes:
- disable springfox-swagger-ui auto documentation
- customize files from swagger-api/swagger-ui repository (v4.14.0)
- exchange Swagger logo for NASA's
- add PDS footer
- collapse all `opblocks` on start, similar to springfox-swagger-ui

Start to NASA-PDS/pds-api#194
jimmie pushed a commit to NASA-PDS/registry-api that referenced this issue Sep 16, 2022
changes:
- disable springfox-swagger-ui auto documentation
- customize files from swagger-api/swagger-ui repository (v4.14.0)
- exchange Swagger logo for NASA's
- add PDS footer
- collapse all `opblocks` on start, similar to springfox-swagger-ui

Start to NASA-PDS/pds-api#194
@c-suh
Copy link

c-suh commented Sep 16, 2022

Thanks to Jimmie, this look is merged into the main branch!
nasa-pds-swagger

@c-suh c-suh closed this as completed Sep 16, 2022
@jimmie
Copy link
Member

jimmie commented Sep 27, 2022 via email

@tloubrieu-jpl
Copy link
Member

@jimmie @jordanpadams does that mean we could forward with the publication of the swagger web page. Note that I am not seeing the nasa logo on my integration deployment here, but this is a detail that we can look at later.

@jordanpadams
Copy link
Member Author

@tloubrieu-jpl I think so? But now that I think about it, I've never seen a demo of this.

@c-suh have you demoed this? And if not, can you demo how to make this at the sprint review?

@miguelp1986
Copy link

@gxtchen
Copy link

gxtchen commented Apr 15, 2023

This use to work in system-i-n-t 30, but now I don't see the jpl skin using registry docker.

@jordanpadams
Copy link
Member Author

@gxtchen
Copy link

gxtchen commented Apr 17, 2023

my bad, works after purging docker images.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants