Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fusio Schema question #585

Open
nsherzog opened this issue Oct 8, 2024 · 1 comment
Open

Fusio Schema question #585

nsherzog opened this issue Oct 8, 2024 · 1 comment
Labels

Comments

@nsherzog
Copy link

nsherzog commented Oct 8, 2024

I'm trying to get my schema to show up in either ReDoc or Swagger-ui. I've designed it both freehand and using Fusio's designer and the app has verified the schema style successfully and set it correctly under 'Operation' but it never shows up in either of the documentation modules. Is there a step or a required part of the schema that I'm missing?

Current schema looks like this:

{
"id": 3,
"status": 1,
"name": "profileExport",
"source": {
"definitions": {
"Contact": {
"description": "facility contact information",
"type": "object",
"properties": {
"FacilityName": {
"description": "name of facility",
"type": "string"
},
"Institution": {
"description": "name of facility's institution",
"type": "string"
},
"RORID": {
"description": "the ror id assigned to institution",
"type": "string"
},
"Website": {
"description": "website of facility typically hosted by institution",
"type": "string"
},
"AltLink2": {
"description": "alternative coremarketplace profile link for facility",
"type": "string"
},
"OrderProcurementURL": {
"description": "url for facility management software, if used",
"type": "string"
}
}
},
"PrimaryContact": {
"description": "primary contacts for facility",
"type": "object",
"$extends": "Contact",
"properties": {
"Name": {
"description": "full name of facility manager",
"type": "string"
},
"Phone": {
"description": "phone number of facility manager",
"type": "string"
}
}
}
}
},
"readonly": false
}

@chriskapp
Copy link
Member

Hi @nsherzog,

everything look good you only need to specify a root schema so that Fusio knows which type should be used from the definitions list, at UI there is also a "primary" button which does this s.

{
  "definitions": {
    "Contact": {
      "description": "facility contact information",
      "type": "object",
      "properties": {
        "FacilityName": {
          "description": "name of facility",
          "type": "string"
        },
        "Institution": {
          "description": "name of facility's institution",
          "type": "string"
        },
        "RORID": {
          "description": "the ror id assigned to institution",
          "type": "string"
        },
        "Website": {
          "description": "website of facility typically hosted by institution",
          "type": "string"
        },
        "AltLink2": {
          "description": "alternative coremarketplace profile link for facility",
          "type": "string"
        },
        "OrderProcurementURL": {
          "description": "url for facility management software, if used",
          "type": "string"
        }
      }
    },
    "PrimaryContact": {
      "description": "primary contacts for facility",
      "type": "object",
      "$extends": "Contact",
      "properties": {
        "Name": {
          "description": "full name of facility manager",
          "type": "string"
        },
        "Phone": {
          "description": "phone number of facility manager",
          "type": "string"
        }
      }
    }
  },
  "$ref": "PrimaryContact"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants