You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Version: Version 73.0.3683.103 (Official Build) (64-bit)
Method of installation:
Swagger-UI version: master (3.22.1)
Swagger/OpenAPI version: OpenAPI 3.0
Content & configuration
Recently, in our company, we switched from Swagger 2.0 to OpenApi 3.0.0.
We are sending requests via x-www-form-urlencoded where we have a list of parameters.
Not all of these parameters are needed, but they get included in our CURL call.
This is making an issue and essentially our API calls are not working.
Example call: curl -X POST "https://.../demo/userapi/V3/tasks/create/" -H "accept: application/json" -H "Content-Type: application/x-www-form-urlencoded" -d "external_id_1=¬es=&target_duration=&external_id_2=&external_id_3=&approve_by_project_leader=&restrict_tracking_from_to=&name=Some%20name&sort_order=2&client_id=&user_id=&duration=&mother_id=1&is_done=&is_blocked=&deadline=&is_hidden_create=&individual_value_1=&team_id=&individual_value_2=&individual_value_3="
The correct one should look like: curl -X POST "https://.../demo/userapi/V3/tasks/create/" -H "accept: application/json" -H "Content-Type: application/x-www-form-urlencoded" -d "name=Some%20name&sort_order=2&mother_id=1"
Essentially, we do not need empty parameters in our calls.
We spent some time looking at the support forums and documentation but didn't find a way to configure this.
Example Swagger/OpenAPI definition:
tasks:
type: objecttitle: Tasksproperties:
id:
type: integermother_id:
type: integerview_id:
type: stringsort_order:
type: integernode_path:
type: stringultimate_mother_id:
type: integername:
type: stringis_done:
type: booleanview_order:
type: numbericon_name:
type: stringinitial_duration:
type: numbertarget_duration:
type: integerbegin:
type: stringformat: datedeadline:
type: stringformat: dateobject_type:
type: stringnotes:
type: stringclient_id:
type: integert_iv_1:
type: stringt_iv_2:
type: stringt_iv_3:
type: stringt_iv_4:
type: stringt_iv_5:
type: stringt_iv_6:
type: stringapprove_by_project_leader:
type: booleanis_blocked:
type: booleanis_hidden:
type: booleanrestrict_tracking_from_to:
type: booleanduration:
type: integer'/userapi/V3/tasks/create/':
post:
tags:
- taskssummary: Creates the tasks objects using a POST API call.operationId: tasksPostCreaterequestBody:
description: "Create tasks based on parameters below"required: falsecontent:
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/tasks_create'responses:
'200':
description: Executed successfullycontent:
application/json:
schema:
type: arrayitems:
$ref: '#/components/schemas/tasks''401':
description: Unauthorized access.'403':
description: No permission for this specific endpoint.'410':
description: Endpoint not available - This API endpoint existed in previous API versions, but not in a current version'487':
description: Endpoint not available - Account migration / maintenance'497':
description: Refresh token has been expired, deleted or tried to issue a new access token with the refresh token but for a different user'500':
description: Server (internal) error'503':
description: Service Unavailable - Common causes are a server that is down for maintenance or overloaded
Hi Helen,
Firstly, thank you for your prompt response, I really appreciate it.
I will join in #5303 thread, I already have some comments that might be useful.
Uh oh!
There was an error while loading. Please reload this page.
Q&A
Content & configuration
Recently, in our company, we switched from Swagger 2.0 to OpenApi 3.0.0.
We are sending requests via x-www-form-urlencoded where we have a list of parameters.
Not all of these parameters are needed, but they get included in our CURL call.
This is making an issue and essentially our API calls are not working.
Example call:
curl -X POST "https://.../demo/userapi/V3/tasks/create/" -H "accept: application/json" -H "Content-Type: application/x-www-form-urlencoded" -d "external_id_1=¬es=&target_duration=&external_id_2=&external_id_3=&approve_by_project_leader=&restrict_tracking_from_to=&name=Some%20name&sort_order=2&client_id=&user_id=&duration=&mother_id=1&is_done=&is_blocked=&deadline=&is_hidden_create=&individual_value_1=&team_id=&individual_value_2=&individual_value_3="
The correct one should look like:
curl -X POST "https://.../demo/userapi/V3/tasks/create/" -H "accept: application/json" -H "Content-Type: application/x-www-form-urlencoded" -d "name=Some%20name&sort_order=2&mother_id=1"
Essentially, we do not need empty parameters in our calls.
We spent some time looking at the support forums and documentation but didn't find a way to configure this.
Example Swagger/OpenAPI definition:
Swagger-UI configuration options:
Describe the bug you're encountering
To reproduce...
API is not publicly available at the moment.
You can import yaml part in a working OpenApi 3.0 and try to execute a test call.
Expected behavior
Provided in a description. Essentially, API calls without empty parameters.
Additional context or thoughts
Might this be some kind of configuration that we are missing?
Thank you very much in advance.
The text was updated successfully, but these errors were encountered: