Sort generated required body and query/path parameters
See original GitHub issueBug report
Given OAS3 like this:
paths:
/{ueId}/sdm-subscriptions:
post:
summary: subscribe to notifications
operationId: Subscribe
tags:
- Subscription Creation
parameters:
- name: ueId
in: path
description: Identity of the user
required: true
schema:
$ref: 'http://localhost:8081/29.571/16.7.0/TS29571_CommonData.yaml#/components/schemas/VarUeId'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/SdmSubscription'
required: true
Expected behaviour: The required body is generated BEFORE the optional parameters in the Python code.
Actual behaviour: The required body is generated AFTER the optional parameters in the Python code. I have to bring it into the right order by hand to solve the issue.
Solution: Put the body function parameter before the other function parameters at the beginning of the parameter list.
Absolutely minor bug, but I thought I report it. Thanks!
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Working with RESTful API Query, Body, and Path Parameters
If you're starting fresh with RESTful APIs, check out this easy introduction to parameter types.
Read more >Query Parameters - FastAPI
Here the query parameter needy is a required query parameter of type str . If you open in your browser a URL like:...
Read more >retrofit 2 @path Vs @query - java - Stack Overflow
It took me a week trying to fix it though by using a non parameter call fetched the resources; So tried to change...
Read more >Registration Data Access Protocol (RDAP) Query Parameters ...
Registration Data Access Protocol (RDAP) Query Parameters for Result Sorting and Paging · 1. Introduction · 2. RDAP Query Parameter Specification · 3....
Read more >Package overview — drf-spectacular documentation
Helper class to document a API parameter / request body / response body with a ... Literal[query, path, header, cookie] = 'query', required:...
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
It’s not a problem, just an observation ^^
@koxudaxi @sa4zet Can we close this issue?