feat: add #/components/schemas parsing to retrieve explicit schema#29
Conversation
|
Hey @johmau, thanks for contributing! I also use this package for code-generation stuff, so I have a question regarding your changes. Since you have schemas in the components section you probably use them in some endpoints' schemas. Could you describe the case when you need schemas from components instead of paths? |
|
Hi @manchenkoff ! I use those schemas to generate specific input classes for my cpp web framework, with that I can create a class named Uuid for example and differenciate the name from the property in the endpoint itself. If I use the property I'm forced to use a class name based on the property name, then If I've several Uuid in my endpoint, I will have several class declaration althought there the same structure and I won't be able to automatically extends them afterward. I've the structure I can generate all my input classes easily. It's really specific but it's also not that weird to have those schemas in the specification class. Thx |
|
Agree, for now this is fine solution, but I had another idea - to parse it with names for endpoints as well, but I need to make some changes in the external package first. So, I left some comments and I'll be ready to merge once you fixed it 👍 |
|
@manchenkoff Ok great ! |
Signed-off-by: johmau <johmau@obspher.com>
f49e3a5 to
820f61f
Compare
|
Hey @johmau, please, check CI report, there is some broken unit test. I assume that is because of the new parameter in the constructor method. |
|
@manchenkoff Forgot unit test Fuuu let's fix that |
Signed-off-by: johmau <johmau@obspher.com>
|
@johmau, 1.1.2 version has been published to PyPi, thanks 👍 |
As "securitySchema", parsing "schemas" would be great.
I'm using it for own code generation plugin.
It would be cool if you put it in the mainline.
Thx