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

Add swagger (OpenAPI 2.0) support #1245

Merged
merged 3 commits into from
Aug 21, 2019
Merged

Add swagger (OpenAPI 2.0) support #1245

merged 3 commits into from
Aug 21, 2019

Conversation

life1347
Copy link
Member

@life1347 life1347 commented Jul 24, 2019

This PR aims to add swagger support to the controller for users to write their own client.

Screen Shot 2019-07-25 at 3 40 21 AM

For those who cannot wait for the PR to be merged:

  1. Go https://editor.swagger.io/
  2. File > Import URL > Paste https://gist.githubusercontent.com/life1347/1fd9b1e55c9897e405f78bac5bcf7c69/raw/45364c36636fd52f2c9f3a97cd926419c2f99604/Fission%2520Swagger%2520API

Fix #85


This change is Reviewable

@life1347 life1347 added this to the 1.5 milestone Jul 26, 2019
@vishal-biyani vishal-biyani self-requested a review August 15, 2019 15:40
kruntime "k8s.io/apimachinery/pkg/runtime"

flag "github.com/spf13/pflag"
"k8s.io/klog"
Copy link
Member

Choose a reason for hiding this comment

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

Why are we adding this?

Copy link
Member Author

@life1347 life1347 Aug 16, 2019

Choose a reason for hiding this comment

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

This tool parses all struct fields and comments to generate description function for go-restful. So that we don't need to write the go-restful description manually. Kubernetes project also utilizes this tool to generate openapi spec.

@life1347 life1347 merged commit b9997b2 into master Aug 21, 2019
@life1347 life1347 deleted the go-restful-apijson branch August 21, 2019 07:49
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.

Swagger API spec is incomplete/outdated
2 participants