fusio icon indicating copy to clipboard operation
fusio copied to clipboard

Schema doesn't save

Open mrabd423 opened this issue 3 years ago • 4 comments

I've installed latest fusio version on linux server, Everything works fine but when we create custom schema with the below json it doesn't save at all

{ "login": { "username": "string", "password": "string" } }

mrabd423 avatar Jan 11 '23 10:01 mrabd423

Hi, so the schema which you have provided is not a valid schema, it must be a valid TypeSchema it should look like s.

{
  "definitions": {
    "Login": {
      "type": "object",
      "properties": {
        "login": {
          "$ref": "Credentials"
        },
      }
    },
    "Credentials": {
      "type": "object",
      "properties": {
        "username": {
          "type": "string"
        },
        "password": {
          "type": "string"
        }
      }
    }
  },
  "$ref": "Login"
}

but you can also use the Editor which we provide at the backend to design this schema.

chriskapp avatar Jan 11 '23 18:01 chriskapp

Thank you for your help Chris, One more confusion here is if request is not coming according to defined schema then is there any validation error it will response back ?

I tried on my end but it loads & loads until the call is timeout. Is this the expected behavior ? Just confirming.

mrabd423 avatar Jan 16 '23 05:01 mrabd423

The other issue we are facing is

We installed fusio on localhost environment in xampp, Application backend dashboard & public/ api works fine until we connect it with a localhost application.

It starts giving error below but the same thing works in our testing environment hosted in linux server.

[2023-01-16T05:43:32.268414+01:00] psx.ERROR: cURL error 6: Could not resolve host: mccorg.localhost

Please help & advise

mrabd423 avatar Jan 16 '23 05:01 mrabd423

@mrabd423 this sounds like a DNS problem that your server can not resolve the hostname, maybe you need to add it to your hosts file?

chriskapp avatar Jan 25 '23 21:01 chriskapp