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

Handle multiple OpenAPI decorators on a single handler #10

Merged
merged 1 commit into from
Aug 13, 2018

Conversation

epiphone
Copy link
Owner

Handle cases such as

  @OpenAPI({
    summary: 'This value will be overwritten!',
    description: 'This value will remain'
  })
  @OpenAPI({
    summary: 'This value will remain'
  })
  listUsers() {
    // ...
  }

Previously the latter OpenAPI was ignored. With this PR, both decorators are applied top-down.

This also enables using OpenAPI internally in custom decorators, as needed in #9.

@codecov
Copy link

codecov bot commented Aug 13, 2018

Codecov Report

Merging #10 into master will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #10      +/-   ##
==========================================
+ Coverage   99.25%   99.27%   +0.01%     
==========================================
  Files           4        4              
  Lines         135      137       +2     
  Branches       31       31              
==========================================
+ Hits          134      136       +2     
  Misses          1        1
Impacted Files Coverage Δ
src/decorators.ts 100% <100%> (ø) ⬆️

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 ae88be2...eee0ae3. Read the comment docs.

@epiphone epiphone merged commit 19b8a9f into master Aug 13, 2018
@epiphone epiphone deleted the feature_multiple_openapis branch August 13, 2018 10:30
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.

1 participant