docs: Fallback to reference description for responses#826
docs: Fallback to reference description for responses#826jean-michelet merged 4 commits intofastify:masterfrom
Conversation
jean-michelet
left a comment
There was a problem hiding this comment.
Thanks for the PR!
I don't know the code base so I can't approve myself.
|
Does it solve your bug @melroy89? |
This comment was marked as outdated.
This comment was marked as outdated.
|
First of all, @jean-michelet, thank you for the review! 🚀 Secondly and equally thankful to @melroy89 for the detailed reproduction description 💪🏼 From what I can see from your code, the only reason why this wouldn't work is due to the trailing |
This comment was marked as outdated.
This comment was marked as outdated.
|
@melroy89 - That's exactly what I meant in my reply, we need to consider those use cases because your reference is 100% correct 😅 The code I pushed in the PR didn't take that into account yet, but just pushed a change that does! I never meant that you should remove |
|
Seems like the second use case you mentioned on your At the moment, seems like cc @asc11cat @Eomm @ivan-tymoshenko, tagging you folks for visibility since you were discussing on the other PR 😄 |
Let me test it again.. |
|
Yup works now! Thank you so much! I was looking for this for years. @Nelspike I would like thank you by providing a donation! Any payment method will do. |
|
@melroy89 - Thank you for your generosity and recognition! I'm totally okay doing this without a donation whatsoever, happy to help wherever I can 🎉 |
OK, if you change your mind. Let me know. |
|
Now hopefully this PR gets merged somewhere before 2030 :) |
I don't think this type of comment is going to help us move any faster. If @climba03003 is ok with the code, I will merge it. |
Signed-off-by: Gürgün Dayıoğlu <hey@gurgun.day>
No one can take a joke anymore. |
gurgunday
left a comment
There was a problem hiding this comment.
lgtm
Haha don't worry @melroy89, I assure you we'll get this done this year :)
I just need another member (@climba03003 would be golden) to review
README.md
Outdated
| }, () => {}) | ||
| ``` | ||
|
|
||
| Additionally, if you provide a `$ref` in your response schema but no description, the reference's description will be used as a fallback. |
There was a problem hiding this comment.
Please state the $ref currently only support the format of matching $id.
It cannot lookup the fragment part. For example, schemaId#/definitions/subSchema
There was a problem hiding this comment.
Good one, would pointing to the PR that's currently in the works (#676) suffice? 👍🏼
There was a problem hiding this comment.
Addressed in a82f2a7, @climba03003 - Feel free to take another look!
Co-authored-by: KaKa <23028015+climba03003@users.noreply.github.com> Signed-off-by: Gürgün Dayıoğlu <hey@gurgun.day>
gurgunday
left a comment
There was a problem hiding this comment.
lgtm
I can release tonight, if anyone's free, feel free to merge and release
|
Release tonight plz @gurgunday! |
Checklist
npm run testandnpm run benchmarkand the Code of conduct
This PR attempts to resolve the issue on #795 by resolving the
$refgiven in the schema and fetching that description in case there's none. PTAL! 🚀