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

chore: use json schema instead hard code #2399

Merged
merged 3 commits into from
Apr 12, 2022
Merged

chore: use json schema instead hard code #2399

merged 3 commits into from
Apr 12, 2022

Conversation

jwrookie
Copy link
Contributor

Signed-off-by: Wei Jiang machowei01@gmail.com

Please answer these questions before submitting a pull request, or your PR will get closed.

Why submit this pull request?

use json schema instead hard code

  • Bugfix
  • New feature provided
  • Improve performance
  • Backport patches

What changes will this PR take into?

Related issues

fix/resolve #2372

Checklist:

  • Did you explain what problem does this PR solve? Or what new features have been added?
  • Have you added corresponding test cases?
  • Have you modified the corresponding document?
  • Is this PR backward compatible? If it is not backward compatible, please discuss on the mailing list first

Signed-off-by: Wei Jiang <machowei01@gmail.com>
Signed-off-by: Wei Jiang <machowei01@gmail.com>
@codecov-commenter
Copy link

codecov-commenter commented Mar 31, 2022

Codecov Report

Merging #2399 (96b8d52) into master (2f1ebac) will decrease coverage by 4.37%.
The diff coverage is 68.42%.

❗ Current head 96b8d52 differs from pull request most recent head 3e49805. Consider uploading reports for the commit 3e49805 to get more accurate results

@@            Coverage Diff             @@
##           master    #2399      +/-   ##
==========================================
- Coverage   68.57%   64.19%   -4.38%     
==========================================
  Files         131       58      -73     
  Lines        3421     4036     +615     
  Branches      828        0     -828     
==========================================
+ Hits         2346     2591     +245     
+ Misses       1075     1073       -2     
- Partials        0      372     +372     
Flag Coverage Δ
backend-e2e-test 37.11% <68.42%> (?)
backend-e2e-test-ginkgo 59.31% <68.42%> (?)
frontend-e2e-test ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...pi/internal/handler/system_config/system_config.go 95.00% <ø> (ø)
api/internal/conf/conf.go 58.15% <60.00%> (ø)
api/internal/core/store/storehub.go 73.10% <100.00%> (ø)
...components/PluginFlow/components/Toolbar/index.tsx
web/src/pages/Setting/service.ts
...components/active-check/Unhealthy/HttpFailures.tsx
web/src/constants.ts
web/src/pages/Dashboard/Dashboard.tsx
web/src/pages/Consumer/components/Step1.tsx
...c/pages/Route/components/ResultView/ResultView.tsx
... and 182 more

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 162c5d7...3e49805. Read the comment docs.

}

if _, ok := hubsNeedCheckByCustomize[key]; ok {
validator, err := NewJsonSchemaValidator("customize." + string(key))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not put this under "main"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

schema.json is output from apisix, my idea is to use different names for distinguishing them

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Signed-off-by: Wei Jiang <machowei01@gmail.com>
@bzp2010 bzp2010 merged commit a964db4 into apache:master Apr 12, 2022
hongbinhsu pushed a commit to fitphp/apix-dashboard that referenced this pull request May 24, 2022
* upstream: (28 commits)
  docs: update some tips in develop.md (apache#2451)
  fix: create upstream error when pass host is node and nodes without port (apache#2421)
  fix: correct data  type of filed Active.checks.active.https_verify_certificate (apache#2422)
  feat: basic support Apache APISIX 2.13.0 (apache#2428)
  feat: add page reload judgment (apache#2370)
  docs: Update RPM install package link (apache#2439)
  docs: Remove hyperlinks from documents (apache#2431)
  chore(deps): bump actions/upload-artifact from 2 to 3 (apache#2423)
  fix: consumer without plugins causes page crashes (apache#2437)
  chore(deps): bump axios from 0.21.1 to 0.21.4 in /web (apache#2420)
  feat: Modify plugin preview page (apache#2359)
  chore(deps): bump moment from 2.29.1 to 2.29.2 in /web (apache#2418)
  chore: use json schema instead hard code (apache#2399)
  refactor: migrate route tests to e2enew (apache#2411)
  chore(deps): bump actions/setup-python from 2.3.2 to 3.1.1 (apache#2414)
  chore: update the year of copyright and fix typo (apache#2417)
  docs: update online playground url (apache#2416)
  chore: update README for online demo (apache#2404)
  refactor: migrate id compatible tests to e2enew (apache#2400)
  docs: fix invalid link (apache#2366)
  ...

# Conflicts:
#	api/internal/route.go
#	web/src/components/Footer/index.tsx
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.

TODO: model checking thougth by json schema
5 participants