这是indexloc提供的服务,不要输入任何密码
Skip to content

Rest API issue to create actions for POST HTTP methods #9734

@prabuanandan

Description

@prabuanandan

Version Information

Server Version:
CLI Version (for CLI related issue): 2.27.o

Environment

Docker image

What is the current behaviour?

Hello,

I am trying to create action for one of the post Rest API call but while creating the action it gives me

[
{
"error_code": "Parse Error",
"message": "Unexpected token 'end'.",
"source_position": {
"end_column": 2,
"end_line": 20,
"start_column": 1,
"start_line": 20
}
}
]

attaching the below swagger to reproduce the issue any help would be appreciated.

But the GET endpoints are easily integrated.

What is the expected behaviour?

The Post API call should be converted to Graphql mutuation

How to reproduce the issue?

  1. Please use the below swagger and create a action for the post call

{ "openapi": "3.0.2", "info": { "title": "Optimisier API", "description": "", "contact": { "name": "Data ", "email": "test@test.com" }, "version": "0.1.4" }, "paths": { "/optimise": { "post": { "tags": [ "optimise" ], "summary": "Optimise", "operationId": "optimise_optimise_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OptimiserRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OptimiserResponse" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPError" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPError" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPError" } } } }, "503": { "description": "Service Unavailable", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPError" } } } } } } } }, "components": { "schemas": { "HTTPError": { "title": "HTTPError", "required": [ "detail" ], "type": "object", "properties": { "detail": { "title": "Detail", "type": "string" } }, "description": "HTTP error schema to be used when an HTTPException is thrown." }, "HTTPValidationError": { "title": "HTTPValidationError", "type": "object", "properties": { "detail": { "title": "Detail", "type": "array", "items": { "$ref": "#/components/schemas/ValidationError" } } } }, "OptimiserRequest": { "title": "OptimiserRequest", "required": [ "gene_name" ], "type": "object", "properties": { "gene_name": { "title": "Gene Name", "type": "string", "description": "The name of the gene" } } }, "OptimiserResponse": { "title": "OptimiserResponse", "type": "object", "properties": { "gene_name": { "title": "Gene Name", "type": "string" } } }, "ValidationError": { "title": "ValidationError", "required": [ "loc", "msg", "type" ], "type": "object", "properties": { "loc": { "title": "Location", "type": "array", "items": { "anyOf": [ { "type": "string" }, { "type": "integer" } ] } }, "msg": { "title": "Message", "type": "string" }, "type": { "title": "Error Type", "type": "string" } } } } } }

Screenshots or Screencast

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions