Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
20
AppBuilder: When adding REST-api the endpoints are disabled and not selectable
posted

Hi 

For a simple test project i created a REST-api with only some endpoints. But when adding this REST-api into AppBuilder the endpoints "Employees" are visible but not selectable - they are grey and looks disabled:

swagger-definition:

swagger_def.txt
{
openapi: "3.0.1",
info: {
title: "FullStack.API",
version: "1.0"
},
paths: {
/api/Employees: {
get: {
tags: [
"Employees"
],
responses: {
200: {
description: "Success"
}
}
},
post: {
tags: [
"Employees"
],
requestBody: {
content: {
application/json: {
schema: {
$ref: "#/components/schemas/Employee"
}
},
text/json: {
schema: {
$ref: "#/components/schemas/Employee"
}
},
application/*+json: {
schema: {
$ref: "#/components/schemas/Employee"
}
}
}
},
responses: {
200: {
description: "Success"
}
}
}
},
/api/Employees/{id}: {
get: {
tags: [
"Employees"
],
parameters: [
{
name: "id",
in: "path",
required: true,
schema: {
type: "string",
format: "uuid"
}
}
],
responses: {
200: {
description: "Success"
}
}
},
put: {
tags: [
"Employees"
],
parameters: [
{
name: "id",
in: "path",
required: true,
schema: {
type: "string",
format: "uuid"
}
}
],
requestBody: {
content: {
application/json: {
schema: {
$ref: "#/components/schemas/Employee"
}
},
text/json: {
schema: {
$ref: "#/components/schemas/Employee"
}
},
application/*+json: {
schema: {
$ref: "#/components/schemas/Employee"
}
}
}
},
responses: {
200: {
description: "Success"
}
}
},
delete: {
tags: [
"Employees"
],
parameters: [
{
name: "id",
in: "path",
required: true,
schema: {
type: "string",
format: "uuid"
}
}
],
responses: {
200: {
description: "Success"
}
}
}
},
/api/TzGemeinden: {
get: {
tags: [
"TzGemeinden"
],
responses: {
200: {
description: "Success"
}
}
}
},
/WeatherForecast: {
get: {
tags: [
"WeatherForecast"
],
operationId: "GetWeatherForecast",
responses: {
200: {
description: "Success",
content: {
text/plain: {
schema: {
type: "array",
items: {
$ref: "#/components/schemas/WeatherForecast"
}
}
},
application/json: {
schema: {
type: "array",
items: {
$ref: "#/components/schemas/WeatherForecast"
}
}
},
text/json: {
schema: {
type: "array",
items: {
$ref: "#/components/schemas/WeatherForecast"
}
}
}
}
}
}
}
}
},
components: {
schemas: {
Employee: {
type: "object",
properties: {
id: {
type: "string",
format: "uuid"
},
name: {
type: "string",
nullable: true
},
email: {
type: "string",
nullable: true
},
phone: {
type: "integer",
format: "int64"
},
salary: {
type: "integer",
format: "int64"
},
department: {
type: "string",
nullable: true
}
},
additionalProperties: false
},
WeatherForecast: {
type: "object",
properties: {
date: {
type: "string",
format: "date-time"
},
temperatureC: {
type: "integer",
format: "int32"
},
temperatureF: {
type: "integer",
format: "int32",
readOnly: true
},
summary: {
type: "string",
nullable: true
}
},
additionalProperties: false
}
}
}
}

Any idea whats going wrong here?

Thanks for any support.

br, Robert

Parents
  • 16310
    Offline posted

    Hey Robert,

    Currently, AppBuilder only support endpoints returning array or object. If the greyed out endpoints are ones that return primitive types, this is the reason for them to appear greyed out, let me verify that and provide more info. Meanwhile, is it possible that you reurn the "original" OpenAPi definiton file? It will contain quotes around namings, which is essential when parsing the content as JSON.

Reply Children