Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@zmievsa
Copy link
Owner

@zmievsa zmievsa commented Oct 16, 2024

No description provided.

@zmievsa zmievsa merged commit 12a3877 into 3.x.x Oct 17, 2024
@zmievsa zmievsa deleted the add-support-for-newer-fastapi branch October 17, 2024 05:44
@feluelle
Copy link

Hey @zmievsa, could you please also port this to the 4.x.x release series?

We have to pin fastapi<=0.112.2 in our project because of the same issue.

@zmievsa
Copy link
Owner Author

zmievsa commented Oct 22, 2024

@feluelle Hi! Which version of Cadwyn do you have? I remember fixing this problem in 4.x.x. However, I'm ready to fix it ASAP if it is a problem for you right now.

My tests indicate otherwise for now though.

@feluelle
Copy link

feluelle commented Oct 22, 2024

Oh, we were on 4.2.2. Dependabot did not update our version for some reason, sorry 🤷🏼 It seems to have been fixed by updating to <4.4.0. I need to look into why 4.4.0 creates an openapi spec without any paths.

@feluelle
Copy link

Any idea why that could be the case, @zmievsa? Happy to open a new issue for that.

@zmievsa
Copy link
Owner Author

zmievsa commented Oct 22, 2024

Please, open a new issue. Any reproducible example would be fine. I'll be able to fix it within less than a day.

@zmievsa
Copy link
Owner Author

zmievsa commented Oct 25, 2024

Hi, @feluelle !

Did the issue with paths resolve on its own or do you still need help? I have put aside time for it today so I can help as soon as you post the reproducible example. No rush though :)

@feluelle
Copy link

feluelle commented Nov 5, 2024

I have been able to resolve the issue by calling app._cadwyn_initialize() before accessing the version router routes when generating the openapi spec.

@feluelle
Copy link

feluelle commented Nov 5, 2024

That works for me, but do you have a recommended way of generating the openapi specs for each registered version? I couldn't find anything about that in the cadwyn docs.

@feluelle
Copy link

feluelle commented Nov 5, 2024

Hmm, so it seems that this is a general issue in my fastapi app. The cadwyn __call__ function does not seem to get called which should call _cadwyn_initialize(). Any idea why that could be?

@zmievsa
Copy link
Owner Author

zmievsa commented Nov 5, 2024

@feluelle Send me a minimal reproducible example, and I'll be able to help you solve the issue within the same day.

@feluelle
Copy link

feluelle commented Nov 8, 2024

Here is a minimal example #229. PTAL when you find time.

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.

3 participants