这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@danielgtaylor
Copy link
Owner

This PR adds a describedby HTTP link relation to each response that links to JSON Schema file that lives outside the OpenAPI. Also adds a $schema property which is supported by many editors to do completion and validation as you type (VSCode, Sublime via Schema Validator, vim via coc-json, etc). See the README updates for more details.

This change accomplishes two things:

  1. Self-describing HTTP responses via links to support REST-style call patterns
  2. Making it easier/intuitive to hand-edit resources in your favorite editor

@codecov
Copy link

codecov bot commented Mar 19, 2022

Codecov Report

Merging #31 (e96f662) into main (269f9ad) will increase coverage by 0.16%.
The diff coverage is 82.14%.

@@            Coverage Diff             @@
##             main      #31      +/-   ##
==========================================
+ Coverage   85.71%   85.87%   +0.16%     
==========================================
  Files          24       24              
  Lines        1799     1869      +70     
==========================================
+ Hits         1542     1605      +63     
- Misses        181      186       +5     
- Partials       76       78       +2     
Impacted Files Coverage Δ
response.go 87.17% <62.50%> (-1.40%) ⬇️
context.go 84.39% <75.75%> (-2.88%) ⬇️
router.go 68.20% <84.00%> (+3.54%) ⬆️
openapi.go 95.34% <100.00%> (+1.06%) ⬆️
operation.go 79.06% <100.00%> (+3.06%) ⬆️
resource.go 77.77% <0.00%> (+3.70%) ⬆️

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 269f9ad...e96f662. Read the comment docs.

@danielgtaylor danielgtaylor merged commit bf3a8a3 into main Mar 21, 2022
@danielgtaylor danielgtaylor deleted the schema-link branch March 21, 2022 06:07
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