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

Revamp Swagger Spec to OpenAPI v3 #365

Merged
merged 40 commits into from Jan 11, 2019
Merged

Revamp Swagger Spec to OpenAPI v3 #365

merged 40 commits into from Jan 11, 2019

Conversation

schloerke
Copy link
Collaborator

@schloerke schloerke commented Jan 3, 2019

This is a non backwards compatible change that will not effect 95% of users as swagger is typically programmatically generated. This will only effect users with custom hacks... but they should be happy with the function hook to additions to the swagger file information.

Features

  • Added openapi.json to pr objects
  • Added function in pr$run(swagger = MY_FUNC) to allow for users to upgrade the swagger spec that is returned to ./swagger.json / ./openapi.json
  • Added test with swagger-cli to validate openapi v3 spec on mac / non cran computers only that have the swagger-cli pkg installed.
  • Have server info be defined from referrer url
  • Use swagger R pkg to reduce plumber package size and allow for updates to the Swagger UI faster than plumber releases

Remaining

@blairj09

blairj09 and others added 29 commits Aug 24, 2018
helps to know how it will be formatted exactly
not necessary if we are switching to using lists and not data.frames
Fixes #322
Fixes #323

See swagger-api/swagger-js#268

Thank you @Hong-Revo for a recursive blueprint in #323
@CLAassistant
Copy link

CLAassistant commented Jan 3, 2019

CLA assistant check
All committers have signed the CLA.

@jcheng5 jcheng5 self-requested a review Jan 3, 2019
jcheng5
jcheng5 approved these changes Jan 3, 2019
@codecov-io
Copy link

codecov-io commented Jan 4, 2019

Codecov Report

Merging #365 into master will decrease coverage by 1.08%.
The diff coverage is 60.52%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #365      +/-   ##
==========================================
- Coverage   88.87%   87.78%   -1.09%     
==========================================
  Files          27       27              
  Lines        1177     1195      +18     
==========================================
+ Hits         1046     1049       +3     
- Misses        131      146      +15
Impacted Files Coverage Δ
R/parse-globals.R 100% <ø> (ø) ⬆️
R/swagger.R 100% <100%> (ø) ⬆️
R/plumber.R 81.16% <29.68%> (-3.54%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4f2e73d...8eab635. Read the comment docs.

@schloerke schloerke changed the title Update Swagger v1 to OpenAPI v3 Revamp Swagger Spec to OpenAPI v3 Jan 11, 2019
@schloerke schloerke merged commit c54259c into master Jan 11, 2019
3 of 5 checks passed
@schloerke schloerke deleted the swagger_3 branch Jan 11, 2019
schloerke added a commit that referenced this issue Jan 11, 2019
* master:
  Revamp Swagger Spec to OpenAPI v3 (#365)
schloerke added a commit that referenced this issue Feb 1, 2019
* master:
  need to set the LC_TIME to C to ensure the Date is formatted in English (#319)
  Require httpuv (>= 1.4.5.9000) (#357)
  appveyor pkg cache will bust when DESCRIPTION changes (#370)
  Revamp Swagger Spec to OpenAPI v3 (#365)
schloerke added a commit that referenced this issue Feb 7, 2019
* master:
  use rtools within appveyor (#381)
  need to set the LC_TIME to C to ensure the Date is formatted in English (#319)
  Require httpuv (>= 1.4.5.9000) (#357)
  appveyor pkg cache will bust when DESCRIPTION changes (#370)
  Revamp Swagger Spec to OpenAPI v3 (#365)
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

5 participants