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

[website] Render Pulsar REST API in ReDoc and Fix endpoint template #2274

Merged
merged 3 commits into from Aug 1, 2018

Conversation

sijie
Copy link
Member

@sijie sijie commented Jul 31, 2018

Motivation

ReDoc provides a good mechanism to load OpenAPI/Swagger-generated API reference documentation.

Changes

  • Bump the swagger dependencies
  • Exclude v1 APIs
  • Exclude functions endpoints (it is using a lot of memories to load function endpoints)
  • Use ReDoc to load the pulsar swagger definition
  • Fix the rest admin api references and endpoint macros

 ### Motivation

[ReDoc](https://github.com/Rebilly/ReDoc) provides a good mechanism to load OpenAPI/Swagger-generated API reference documentation.

 ### Changes

- Use ReDoc to load the pulsar swagger definition
- Fix the rest admin api references and `endpoint` macros
@sijie sijie added this to the 2.2.0-incubating milestone Jul 31, 2018
@sijie sijie self-assigned this Jul 31, 2018
@sijie
Copy link
Member Author

sijie commented Jul 31, 2018

@cckellogg ^^

mvn -am -pl pulsar-broker install -DskipTests -Pswagger
echo "Swagger json file is generated."

cp pulsar-broker/target/docs/swagger.json site2/website/static/swagger/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will this file be auto generated when we build the site or will we build it and check it in?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes. it will be auto generated when we build the site. I am adding this script here but it will be called in the CI build.

@@ -20,5 +20,8 @@
},
"jest": {
"preset": "jest-puppeteer"
},
"dependencies": {
"redoc": "^2.0.0-alpha.30"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this be moved to devDependencies since the site is statically generated.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah moved

@sijie
Copy link
Member Author

sijie commented Aug 1, 2018

rerun cpp tests

1 similar comment
@sijie
Copy link
Member Author

sijie commented Aug 1, 2018

rerun cpp tests

@sijie sijie merged commit 6b77a23 into apache:master Aug 1, 2018
@sijie sijie deleted the swagger_v2 branch August 1, 2018 08:19
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.

None yet

4 participants