wI2L / fizz

:lemon: Gin wrapper with OpenAPI 3 spec generation
https://pkg.go.dev/github.com/wI2L/fizz
MIT License
214 stars 52 forks source link

Add x-internal #64

Closed nikicc closed 2 years ago

nikicc commented 2 years ago

This PR adds the support for marking the endpoints as x-internal, which is a mechanism for hiding endpoints in the rendered docs.

Background

Some docs rendering tools (e.g. ReDoc and Elements) support the functionality of the endpoints to be hidden from the docs, if they are marked as x-internal. The changes here add the support for x-internal.

nikicc commented 2 years ago

@wI2L wdyt?

wI2L commented 2 years ago

I merged some old pending PR, you need to rebase from the master branch.

codecov[bot] commented 2 years ago

Codecov Report

Merging #64 (075f606) into master (1ced8ff) will increase coverage by 0.01%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #64      +/-   ##
==========================================
+ Coverage   95.17%   95.18%   +0.01%     
==========================================
  Files           7        7              
  Lines         953      956       +3     
==========================================
+ Hits          907      910       +3     
  Misses         30       30              
  Partials       16       16              
Impacted Files Coverage Δ
openapi/spec.go 81.57% <ø> (ø)
fizz.go 98.68% <100.00%> (+0.01%) :arrow_up:
openapi/generator.go 94.26% <100.00%> (+<0.01%) :arrow_up:

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 1ced8ff...075f606. Read the comment docs.