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

REST API viewer shows ":undefined" for type on empty inputs/outputs #65

Merged
merged 2 commits into from
Apr 20, 2020

Conversation

peterbroadhurst
Copy link
Contributor

Compiling a contract with methods that have no inputs or no outputs (such as a default constructor) the OpenAPI renders with a confusing :undefined output - because we do not include "type": "object" in the empty schema defintiion.

image

@peterbroadhurst
Copy link
Contributor Author

Added a fix for #66 to this PR.

@codecov
Copy link

codecov bot commented Apr 20, 2020

Codecov Report

Merging #65 into master will decrease coverage by 0.03%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #65      +/-   ##
==========================================
- Coverage   97.90%   97.86%   -0.04%     
==========================================
  Files          50       50              
  Lines        5346     5347       +1     
==========================================
- Hits         5234     5233       -1     
  Misses         81       81              
- Partials       31       33       +2     
Impacted Files Coverage Δ
internal/kldopenapi/abi2swagger.go 100.00% <100.00%> (ø)
internal/kldkafka/kafkabridge.go 98.06% <0.00%> (-0.97%) ⬇️

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 b04387d...9902d9c. Read the comment docs.

@peterbroadhurst peterbroadhurst merged commit 151bbe7 into master Apr 20, 2020
@peterbroadhurst peterbroadhurst deleted the fix-empty-schema branch April 20, 2020 17:18
awrichar pushed a commit that referenced this pull request Jun 7, 2021
)

* REST API viewer shows ":undefined" for type on empty inputs/outputs

* Fix intermittent test by moving duplicate check to separate test

Signed-off-by: Peter Broadhurst <[email protected]>
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.

2 participants