Fixed body and header issues with app creator
This commit is contained in:
+16
-49
@@ -16,7 +16,7 @@ import (
|
|||||||
|
|
||||||
"cloud.google.com/go/storage"
|
"cloud.google.com/go/storage"
|
||||||
"github.com/getkin/kin-openapi/openapi3"
|
"github.com/getkin/kin-openapi/openapi3"
|
||||||
"github.com/satori/go.uuid"
|
//"github.com/satori/go.uuid"
|
||||||
"gopkg.in/yaml.v2"
|
"gopkg.in/yaml.v2"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -347,7 +347,11 @@ func generateYaml(swagger *openapi3.Swagger, newmd5 string) (WorkflowApp, []stri
|
|||||||
|
|
||||||
api.Name = swagger.Info.Title
|
api.Name = swagger.Info.Title
|
||||||
api.Description = swagger.Info.Description
|
api.Description = swagger.Info.Description
|
||||||
api.ID = uuid.NewV4().String()
|
|
||||||
|
// FIXME: Versioning issue?
|
||||||
|
api.ID = newmd5
|
||||||
|
//uuid.NewV4().String()
|
||||||
|
|
||||||
api.IsValid = true
|
api.IsValid = true
|
||||||
api.Link = swagger.Servers[0].URL // host doesnt exist lol
|
api.Link = swagger.Servers[0].URL // host doesnt exist lol
|
||||||
if strings.HasSuffix(api.Link, "/") {
|
if strings.HasSuffix(api.Link, "/") {
|
||||||
@@ -722,7 +726,7 @@ func handleConnect(swagger *openapi3.Swagger, api WorkflowApp, extraParameters [
|
|||||||
optionalParameters := []WorkflowAppActionParameter{}
|
optionalParameters := []WorkflowAppActionParameter{}
|
||||||
if len(path.Connect.Parameters) > 0 {
|
if len(path.Connect.Parameters) > 0 {
|
||||||
for _, param := range path.Connect.Parameters {
|
for _, param := range path.Connect.Parameters {
|
||||||
if param.Value.Schema == nil {
|
if param.Value.Schema == nil || param.Value.In == "header" {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
curParam := WorkflowAppActionParameter{
|
curParam := WorkflowAppActionParameter{
|
||||||
@@ -828,8 +832,7 @@ func handleGet(swagger *openapi3.Swagger, api WorkflowApp, extraParameters []Wor
|
|||||||
optionalParameters := []WorkflowAppActionParameter{}
|
optionalParameters := []WorkflowAppActionParameter{}
|
||||||
if len(path.Get.Parameters) > 0 {
|
if len(path.Get.Parameters) > 0 {
|
||||||
for _, param := range path.Get.Parameters {
|
for _, param := range path.Get.Parameters {
|
||||||
//log.Printf("TYPE: %#v", param.Value.Schema)
|
if param.Value.Schema == nil || param.Value.In == "header" {
|
||||||
if param.Value.Schema == nil {
|
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -933,7 +936,7 @@ func handleHead(swagger *openapi3.Swagger, api WorkflowApp, extraParameters []Wo
|
|||||||
optionalParameters := []WorkflowAppActionParameter{}
|
optionalParameters := []WorkflowAppActionParameter{}
|
||||||
if len(path.Head.Parameters) > 0 {
|
if len(path.Head.Parameters) > 0 {
|
||||||
for _, param := range path.Head.Parameters {
|
for _, param := range path.Head.Parameters {
|
||||||
if param.Value.Schema == nil {
|
if param.Value.Schema == nil || param.Value.In == "header" {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
curParam := WorkflowAppActionParameter{
|
curParam := WorkflowAppActionParameter{
|
||||||
@@ -1036,7 +1039,7 @@ func handleDelete(swagger *openapi3.Swagger, api WorkflowApp, extraParameters []
|
|||||||
optionalParameters := []WorkflowAppActionParameter{}
|
optionalParameters := []WorkflowAppActionParameter{}
|
||||||
if len(path.Delete.Parameters) > 0 {
|
if len(path.Delete.Parameters) > 0 {
|
||||||
for _, param := range path.Delete.Parameters {
|
for _, param := range path.Delete.Parameters {
|
||||||
if param.Value.Schema == nil {
|
if param.Value.Schema == nil || param.Value.In == "header" {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
curParam := WorkflowAppActionParameter{
|
curParam := WorkflowAppActionParameter{
|
||||||
@@ -1140,26 +1143,13 @@ func handlePost(swagger *openapi3.Swagger, api WorkflowApp, extraParameters []Wo
|
|||||||
optionalQueries := []string{}
|
optionalQueries := []string{}
|
||||||
parameters := []string{}
|
parameters := []string{}
|
||||||
optionalParameters := []WorkflowAppActionParameter{}
|
optionalParameters := []WorkflowAppActionParameter{}
|
||||||
/*
|
|
||||||
WorkflowAppActionParameter{
|
|
||||||
Name: "body",
|
|
||||||
Description: "The body to use",
|
|
||||||
Multiline: true,
|
|
||||||
Required: false,
|
|
||||||
Example: `{"username": "test"}`,
|
|
||||||
Schema: SchemaDefinition{
|
|
||||||
Type: "string",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
if len(path.Post.Parameters) > 0 {
|
if len(path.Post.Parameters) > 0 {
|
||||||
for _, param := range path.Post.Parameters {
|
for _, param := range path.Post.Parameters {
|
||||||
if param.Value.Schema == nil {
|
if param.Value.Schema == nil || param.Value.In == "header" {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Printf("PARAM: %#v", param.Value)
|
|
||||||
curParam := WorkflowAppActionParameter{
|
curParam := WorkflowAppActionParameter{
|
||||||
Name: param.Value.Name,
|
Name: param.Value.Name,
|
||||||
Description: param.Value.Description,
|
Description: param.Value.Description,
|
||||||
@@ -1257,21 +1247,10 @@ func handlePatch(swagger *openapi3.Swagger, api WorkflowApp, extraParameters []W
|
|||||||
firstQuery = true
|
firstQuery = true
|
||||||
optionalQueries := []string{}
|
optionalQueries := []string{}
|
||||||
parameters := []string{}
|
parameters := []string{}
|
||||||
optionalParameters := []WorkflowAppActionParameter{
|
optionalParameters := []WorkflowAppActionParameter{}
|
||||||
WorkflowAppActionParameter{
|
|
||||||
Name: "body",
|
|
||||||
Description: "The body to use",
|
|
||||||
Multiline: true,
|
|
||||||
Required: false,
|
|
||||||
Example: `{"username": "test"}`,
|
|
||||||
Schema: SchemaDefinition{
|
|
||||||
Type: "string",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
if len(path.Patch.Parameters) > 0 {
|
if len(path.Patch.Parameters) > 0 {
|
||||||
for _, param := range path.Patch.Parameters {
|
for _, param := range path.Patch.Parameters {
|
||||||
if param.Value.Schema == nil {
|
if param.Value.Schema == nil || param.Value.In == "header" {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
curParam := WorkflowAppActionParameter{
|
curParam := WorkflowAppActionParameter{
|
||||||
@@ -1372,22 +1351,10 @@ func handlePut(swagger *openapi3.Swagger, api WorkflowApp, extraParameters []Wor
|
|||||||
optionalQueries := []string{}
|
optionalQueries := []string{}
|
||||||
parameters := []string{}
|
parameters := []string{}
|
||||||
optionalParameters := []WorkflowAppActionParameter{}
|
optionalParameters := []WorkflowAppActionParameter{}
|
||||||
/*
|
|
||||||
WorkflowAppActionParameter{
|
|
||||||
Name: "body",
|
|
||||||
Description: "The body to use",
|
|
||||||
Multiline: true,
|
|
||||||
Required: false,
|
|
||||||
Example: `{"username": "test"}`,
|
|
||||||
Schema: SchemaDefinition{
|
|
||||||
Type: "string",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
if len(path.Put.Parameters) > 0 {
|
if len(path.Put.Parameters) > 0 {
|
||||||
for _, param := range path.Put.Parameters {
|
for _, param := range path.Put.Parameters {
|
||||||
if param.Value.Schema == nil {
|
if param.Value.Schema == nil || param.Value.In == "header" {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
curParam := WorkflowAppActionParameter{
|
curParam := WorkflowAppActionParameter{
|
||||||
|
|||||||
+21
-13
@@ -2112,7 +2112,6 @@ func SetSession(ctx context.Context, Userdata User, value string) error {
|
|||||||
func setOpenApiDatastore(ctx context.Context, id string, data ParsedOpenApi) error {
|
func setOpenApiDatastore(ctx context.Context, id string, data ParsedOpenApi) error {
|
||||||
k := datastore.NameKey("openapi3", id, nil)
|
k := datastore.NameKey("openapi3", id, nil)
|
||||||
if _, err := dbclient.Put(ctx, k, &data); err != nil {
|
if _, err := dbclient.Put(ctx, k, &data); err != nil {
|
||||||
log.Println(err)
|
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5075,6 +5074,8 @@ func getOpenapi(resp http.ResponseWriter, request *http.Request) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
log.Printf("API LENGTH GET: %d, ID: %s", len(parsedApi.Body), id)
|
||||||
|
|
||||||
parsedApi.Success = true
|
parsedApi.Success = true
|
||||||
data, err := json.Marshal(parsedApi)
|
data, err := json.Marshal(parsedApi)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -5505,13 +5506,6 @@ func verifySwagger(resp http.ResponseWriter, request *http.Request) {
|
|||||||
// Test = client side with fetch?
|
// Test = client side with fetch?
|
||||||
|
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
//client, err := storage.NewClient(ctx)
|
|
||||||
//if err != nil {
|
|
||||||
// log.Printf("Failed to create client (storage): %v", err)
|
|
||||||
// resp.WriteHeader(401)
|
|
||||||
// resp.Write([]byte(`{"success": false, "reason": "Failed creating client"}`))
|
|
||||||
// return
|
|
||||||
//}
|
|
||||||
|
|
||||||
swagger, err := openapi3.NewSwaggerLoader().LoadSwaggerFromData(body)
|
swagger, err := openapi3.NewSwaggerLoader().LoadSwaggerFromData(body)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -5542,6 +5536,9 @@ func verifySwagger(resp http.ResponseWriter, request *http.Request) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
log.Printf("PATHS: %#v", swagger.Paths["/comments/put"])
|
||||||
|
log.Printf("Functions: %d", len(swagger.Paths))
|
||||||
|
log.Printf("Actions: %d", len(api.Actions))
|
||||||
api.Owner = user.Id
|
api.Owner = user.Id
|
||||||
|
|
||||||
err = dumpApi(basePath, api)
|
err = dumpApi(basePath, api)
|
||||||
@@ -5680,24 +5677,35 @@ func verifySwagger(resp http.ResponseWriter, request *http.Request) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
log.Printf("DO I REACH HERE WHEN SAVING?")
|
||||||
parsed := ParsedOpenApi{
|
parsed := ParsedOpenApi{
|
||||||
ID: api.ID,
|
ID: newmd5,
|
||||||
Body: string(body),
|
Body: string(body),
|
||||||
}
|
}
|
||||||
|
|
||||||
setOpenApiDatastore(ctx, api.ID, parsed)
|
log.Printf("API LENGTH: %d, ID: %s", len(parsed.Body), newmd5)
|
||||||
err = increaseStatisticsField(ctx, "total_apps_created", api.ID, 1)
|
// FIXME: Might cause versioning issues if we re-use the same!!
|
||||||
|
// FIXME: Need a way to track different versions of the same app properly.
|
||||||
|
// Hint: Save API.id somewhere, and use newmd5 to save latest version
|
||||||
|
err = setOpenApiDatastore(ctx, newmd5, parsed)
|
||||||
|
if err != nil {
|
||||||
|
log.Printf("Failed saving to datastore: %s", err)
|
||||||
|
resp.WriteHeader(500)
|
||||||
|
resp.Write([]byte(fmt.Sprintf(`{"success": true, "reason": "%"}`, err)))
|
||||||
|
}
|
||||||
|
|
||||||
|
err = increaseStatisticsField(ctx, "total_apps_created", newmd5, 1)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("Failed to increase success execution stats: %s", err)
|
log.Printf("Failed to increase success execution stats: %s", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
err = increaseStatisticsField(ctx, "openapi_apps_created", api.ID, 1)
|
err = increaseStatisticsField(ctx, "openapi_apps_created", newmd5, 1)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("Failed to increase success execution stats: %s", err)
|
log.Printf("Failed to increase success execution stats: %s", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
resp.WriteHeader(200)
|
resp.WriteHeader(200)
|
||||||
resp.Write([]byte(`{"success": true}`))
|
resp.Write([]byte(fmt.Sprintf(`{"success": true, "id": "%s"}`, api.ID)))
|
||||||
}
|
}
|
||||||
|
|
||||||
func healthCheckHandler(resp http.ResponseWriter, request *http.Request) {
|
func healthCheckHandler(resp http.ResponseWriter, request *http.Request) {
|
||||||
|
|||||||
@@ -2745,6 +2745,9 @@ func getWorkflowAppConfig(resp http.ResponseWriter, request *http.Request) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//log.Printf("%#v", parsedApi)
|
||||||
|
log.Printf("API LEN: %d, ID: %s", len(parsedApi.Body), fileId)
|
||||||
|
|
||||||
//log.Printf("Parsed API: %#v", parsedApi)
|
//log.Printf("Parsed API: %#v", parsedApi)
|
||||||
if len(parsedApi.ID) > 0 {
|
if len(parsedApi.ID) > 0 {
|
||||||
parsedApi.Success = true
|
parsedApi.Success = true
|
||||||
|
|||||||
+69
-27
@@ -60,7 +60,7 @@ const useStyles = makeStyles({
|
|||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
function rewrite(args) {
|
const rewrite = (args) => {
|
||||||
return args.reduce(function(args, a){
|
return args.reduce(function(args, a){
|
||||||
if (0 == a.indexOf('-X')) {
|
if (0 == a.indexOf('-X')) {
|
||||||
args.push('-X')
|
args.push('-X')
|
||||||
@@ -73,14 +73,15 @@ function rewrite(args) {
|
|||||||
}, [])
|
}, [])
|
||||||
}
|
}
|
||||||
|
|
||||||
function parseField(s) {
|
const parseField = (s) => {
|
||||||
return s.split(/: (.+)/)
|
return s.split(/: (.+)/)
|
||||||
}
|
}
|
||||||
|
|
||||||
function isURL(s) {
|
const isURL = (s) => {
|
||||||
return /^https?:\/\//.test(s)
|
return /^https?:\/\//.test(s)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Parses CURL to a real request
|
||||||
const parseCurl = (s) => {
|
const parseCurl = (s) => {
|
||||||
//console.log("CURL: ", s)
|
//console.log("CURL: ", s)
|
||||||
|
|
||||||
@@ -230,16 +231,16 @@ const AppCreator = (props) => {
|
|||||||
|
|
||||||
const [currentActionMethod, setCurrentActionMethod] = useState(actionNonBodyRequest[0])
|
const [currentActionMethod, setCurrentActionMethod] = useState(actionNonBodyRequest[0])
|
||||||
const [currentAction, setCurrentAction] = useState({
|
const [currentAction, setCurrentAction] = useState({
|
||||||
"name": "",
|
"name": "",
|
||||||
"description": "",
|
"description": "",
|
||||||
"url": "",
|
"url": "",
|
||||||
"headers": "",
|
"headers": "",
|
||||||
"paths": [],
|
"paths": [],
|
||||||
"queries": [],
|
"queries": [],
|
||||||
"body": "",
|
"body": "",
|
||||||
"errors": [],
|
"errors": [],
|
||||||
"method": actionNonBodyRequest[0],
|
"method": actionNonBodyRequest[0],
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -429,6 +430,16 @@ const AppCreator = (props) => {
|
|||||||
} else if (parameter.in === "path") {
|
} else if (parameter.in === "path") {
|
||||||
// FIXME - parse this to the URL too
|
// FIXME - parse this to the URL too
|
||||||
newaction.paths.push(parameter.name)
|
newaction.paths.push(parameter.name)
|
||||||
|
|
||||||
|
// FIXME: This doesn't follow OpenAPI3 exactly.
|
||||||
|
// https://swagger.io/docs/specification/describing-request-body/
|
||||||
|
// https://swagger.io/docs/specification/describing-parameters/
|
||||||
|
// Need to split the data.
|
||||||
|
} else if (parameter.in === "body") {
|
||||||
|
console.log("BODY: ", parameter)
|
||||||
|
newaction.body = parameter.example
|
||||||
|
} else if (parameter.in === "header") {
|
||||||
|
newaction.headers += `${parameter.name}=${parameter.example}\n`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -579,10 +590,42 @@ const AppCreator = (props) => {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(data.paths[item.url][item.method.toLowerCase()])
|
|
||||||
|
|
||||||
data.paths[item.url][item.method.toLowerCase()].parameters.push(newitem)
|
data.paths[item.url][item.method.toLowerCase()].parameters.push(newitem)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (item.headers.length > 0) {
|
||||||
|
const required = false
|
||||||
|
|
||||||
|
const headersSplit = item.headers.split("\n")
|
||||||
|
for (var key in headersSplit) {
|
||||||
|
const header = headersSplit[key]
|
||||||
|
var key = ""
|
||||||
|
var value = ""
|
||||||
|
if (header.length > 0 && header.includes("=")) {
|
||||||
|
const headersplit = header.split("=")
|
||||||
|
key = headersplit[0]
|
||||||
|
value = headersplit[1]
|
||||||
|
} else {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
if (key.length > 0 && value.length > 0) {
|
||||||
|
newitem = {
|
||||||
|
"in": "header",
|
||||||
|
"name": key,
|
||||||
|
"multiline": false,
|
||||||
|
"description": "Header generated by shuffler.io OpenAPI",
|
||||||
|
"required": false,
|
||||||
|
"example": value,
|
||||||
|
"schema": {
|
||||||
|
"type": "string",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
data.paths[item.url][item.method.toLowerCase()].parameters.push(newitem)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (authenticationOption === "API key") {
|
if (authenticationOption === "API key") {
|
||||||
@@ -604,6 +647,8 @@ const AppCreator = (props) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.log("ACTIONS: ", data.paths)
|
||||||
|
|
||||||
fetch(globalUrl+"/api/v1/verify_openapi", {
|
fetch(globalUrl+"/api/v1/verify_openapi", {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
@@ -627,7 +672,11 @@ const AppCreator = (props) => {
|
|||||||
alert.error("Failed to verify: ")
|
alert.error("Failed to verify: ")
|
||||||
} else {
|
} else {
|
||||||
alert.success("Successfully uploaded openapi")
|
alert.success("Successfully uploaded openapi")
|
||||||
//window.location = "/apps"
|
if (window.location.pathname.includes("/new")) {
|
||||||
|
if (responseJson.id !== undefined && responseJson.id !== null) {
|
||||||
|
window.location = `/apps/edit/${responseJson.id}`
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
@@ -891,7 +940,7 @@ const AppCreator = (props) => {
|
|||||||
|
|
||||||
const bodyInfo = actionBodyRequest.includes(currentActionMethod) ?
|
const bodyInfo = actionBodyRequest.includes(currentActionMethod) ?
|
||||||
<div>
|
<div>
|
||||||
Body
|
Body - used as example in action argument
|
||||||
<TextField
|
<TextField
|
||||||
required
|
required
|
||||||
style={{flex: "1", marginRight: "15px", backgroundColor: inputColor}}
|
style={{flex: "1", marginRight: "15px", backgroundColor: inputColor}}
|
||||||
@@ -922,10 +971,7 @@ const AppCreator = (props) => {
|
|||||||
currentAction.queries = urlPathQueries
|
currentAction.queries = urlPathQueries
|
||||||
setUrlPathQueries([])
|
setUrlPathQueries([])
|
||||||
|
|
||||||
console.log(actions)
|
|
||||||
console.log(currentAction.name)
|
|
||||||
const actionIndex = actions.findIndex(data => data.name === currentAction.name)
|
const actionIndex = actions.findIndex(data => data.name === currentAction.name)
|
||||||
console.log(actionIndex)
|
|
||||||
if (actionIndex < 0) {
|
if (actionIndex < 0) {
|
||||||
actions.push(currentAction)
|
actions.push(currentAction)
|
||||||
} else {
|
} else {
|
||||||
@@ -953,9 +999,6 @@ const AppCreator = (props) => {
|
|||||||
errormessage.push("All queries must have a value")
|
errormessage.push("All queries must have a value")
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(urlPathParameters)
|
|
||||||
// const [urlPathParameters, setUrlPathParameters] = useState([]);
|
|
||||||
|
|
||||||
return errormessage
|
return errormessage
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1039,7 +1082,6 @@ const AppCreator = (props) => {
|
|||||||
setActionField("paths", paths)
|
setActionField("paths", paths)
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log("QUERIES: ", queries)
|
|
||||||
var tmpQueries = []
|
var tmpQueries = []
|
||||||
|
|
||||||
// No overlapping of names
|
// No overlapping of names
|
||||||
@@ -1204,7 +1246,7 @@ const AppCreator = (props) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (request.header !== undefined && request.header !== null) {
|
if (request.header !== undefined && request.header !== null) {
|
||||||
var headers = ""
|
var headers = []
|
||||||
for (let [key, value] of Object.entries(request.header)) {
|
for (let [key, value] of Object.entries(request.header)) {
|
||||||
headers += key+"="+value+"\n"
|
headers += key+"="+value+"\n"
|
||||||
}
|
}
|
||||||
@@ -1249,7 +1291,7 @@ const AppCreator = (props) => {
|
|||||||
addPathQuery()
|
addPathQuery()
|
||||||
}}>New query</Button>
|
}}>New query</Button>
|
||||||
<div/>
|
<div/>
|
||||||
Headers
|
Headers - static for the action
|
||||||
<TextField
|
<TextField
|
||||||
required
|
required
|
||||||
style={{flex: "1", marginRight: "15px", marginTop: "5px", backgroundColor: inputColor}}
|
style={{flex: "1", marginRight: "15px", marginTop: "5px", backgroundColor: inputColor}}
|
||||||
@@ -1310,7 +1352,7 @@ const AppCreator = (props) => {
|
|||||||
"errors": [],
|
"errors": [],
|
||||||
"method": actionNonBodyRequest[0],
|
"method": actionNonBodyRequest[0],
|
||||||
})
|
})
|
||||||
setCurrentActionMethod(actionNonBodyRequest[0])
|
setCurrentActionMethod(actionNonBodyRequest[0])
|
||||||
setActionsModalOpen(true)
|
setActionsModalOpen(true)
|
||||||
}}>New action</Button>
|
}}>New action</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user