$refs in parameter is not processed
See original GitHub issueI expect
$refs in parameters to be processed, eg
paths:
/foo:
parameters:
- $ref: '#/components/parameters/MyParam'
components:
parameters:
MyParam:
name: foo
schema:
type: string
Instead
I get KeyError
File "/usr/local/lib/python3.8/site-packages/fastapi_code_generator/parser.py", line 207, in get_parameter_type
schema: JsonSchemaObject = JsonSchemaObject.parse_obj(parameter["schema"])
KeyError: 'schema'
Issue Analytics
- State:
- Created 3 years ago
- Comments:29 (17 by maintainers)
Top Results From Across the Web
c# - Method Parameters with ref not working - Stack Overflow
Create a string variable and supply this to your "AbendProgram" method. The error message is telling you what's wrong. A ref or out...
Read more >7302 (h264_nvenc / b_ref_mode middle with refs parameter is ...
Hello,. b_ref_mode option with refs parameter is not working, giving out below error: InitializeEncoder failed: invalid param (8).
Read more >Common Query Parameters | Apache Solr Reference Guide 6.6
An empty list will log no parameters, so if logging all parameters is desired, ... Solr should use to process the main query...
Read more >Pseudo parameters reference - AWS CloudFormation
Lists the details of the available pseudo parameters that are predefined by AWS CloudFormation.
Read more >MATLAB fminsearch - Optimization - MathWorks
Sometimes your objective function has extra parameters. These parameters are not variables to optimize, they are fixed values during the optimization.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@oktavlachs
I didn’t know it.
I guess
openapi-generator-cli
supports openapi features like multiple status codes of responses. (But, We can implement the features to fastapi-code-generator.) Also, the code-generator creates project files (tests, docker file, …)However,
openapi-generator-cli
can generate only a simple model. https://github.com/OpenAPITools/openapi-generator/commit/0da409986889dcfab1420fb1410ae9509a5834c8#diff-b667e564efa49b2fa6b6d766c52b062dc73f3e6444046e34d9457d6e532e91e0fastapi-code-generator
usedatamodel-code-generator
to generate models. Thedatamodel-code-generator
supports a lot of features. For example,allOf
is created as an inherited class. I believe definitely this is the best advantage.Btw,
datamodel-code-generator
is used in a lot of projects. It’s download about 100k per month. Famous tech compies convert complex and large Schema files to pydantic models bydatamodel-code-generator
. 😉If fastapi-code-generator can call all features of datamodel-code-generator then I guess fastapi-code-generator becomes an awesome tool to generate fastapi and pydnatic code.
@koxudaxi yes,
parameters
can acceptcontent
in OAS3. It is the first time I see it though 😃 https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.1.md#parameterObject