-
Notifications
You must be signed in to change notification settings - Fork 324
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
Fix issue with missing required field default value in Navbar JSON schema. #130
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #130 +/- ##
=======================================
Coverage 94.01% 94.01%
=======================================
Files 11 11
Lines 718 718
=======================================
Hits 675 675
Misses 43 43 ☔ View full report in Codecov by Sentry. |
We should add a test. Please have a go, if you can't I'll add one. |
Added test for /docs endpoint, please review. PS: I have trouble doing pre-commit check locally so I uninstall it, and then so many lint issue.... If I turn on pre-commit it report :
I need to comment out:
And then:
I don't know what to do then... |
@YiHuangIX contributing to open source (and software development in general) takes a fair git of persistence and willingness to solve problems yourself. You shouldn't just post every error you get to the project in the hope and expectation that someone else will tell you how to fix it. Your time is not more valuable than mine! To solve pre-commit, you can:
|
demo/tests.py
Outdated
|
||
|
||
def test_doc(): | ||
r = client.get('/docs') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test wouldn't pick up the error since /openapi.json
hasn't been loaded - it would be loaded by the browser when getting /docs
, but you're not using a browser here, just a test client.
In general it's worth reverting your fix and checking that your new test fails to confirm the test is doing its job.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Saw your new test scripts. Well done!
thanks so much. |
Thank you! For all your comments and feedbacks... I am still new to opensource communities, I am happy to work with leaders like you. |
This is fix for #129 Demo code /docs Fetch error Internal Server Error /openapi.json
Issue:
when generating openapi schema for fastui component, for navibar component, default value for key = "required" is missing
Solution:
Add default value when generating schema
Note:
In docs some api point loading still very slow due to known issue: see #58