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

Conversation

@life1347
Copy link
Member

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 force-pushed the go-restful-apijson branch from 8d71e02 to 12725f7 Jul 24, 2019

@life1347 life1347 added this to the 1.5 milestone Jul 26, 2019

@vishal-biyani vishal-biyani self-requested a review Aug 15, 2019

kruntime "k8s.io/apimachinery/pkg/runtime"

flag "github.com/spf13/pflag"
"k8s.io/klog"

This comment has been minimized.

Copy link
@soamvasani

soamvasani Aug 15, 2019

Member

Why are we adding this?

This comment has been minimized.

Copy link
@life1347

life1347 Aug 16, 2019

Author Member

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 force-pushed the go-restful-apijson branch from 12725f7 to fe6bbf6 Aug 20, 2019

@life1347 life1347 merged commit b9997b2 into master Aug 21, 2019

6 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
security/snyk - environments/jvm/pom.xml (soamvasani) No new issues
Details
security/snyk - environments/nodejs/package.json (soamvasani) No manifest changes detected
security/snyk - environments/python/requirements.txt (soamvasani) No manifest changes detected
security/snyk - environments/ruby/Gemfile.lock (soamvasani) No manifest changes detected
security/snyk - examples/nodejs/package.json (soamvasani) No manifest changes detected

@life1347 life1347 deleted the go-restful-apijson branch Aug 21, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.