cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate II
Advocate II

JSON UPLOAD DOES NOT WORK: Required property "items" is not present or not a JSON object

we use swagger, and we have a json that works perfectly with swagge (it is also written that the swagger is valid with the green sign at the bottom of the page).

 

But this same json, cannot be uploaded to the powerapps, it says:

powererror.jpg

 

An error occured while converting swagger file to WADL file. Error: 'Required property "items" is not present or not a JSON object at JSON path definitions.HundeVersicherung-typeRequest.properties.input'. Your API may not work with apps.

 

 

what is the problem?

here is my problematic swagger:

 

"HundeVersicherung-typeRequest": {
"title": "HundeVersicherung-typeRequest",
"type": "object",
"properties": {
"worksheetName": {
"type": "string"
},
"input": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"name": {
"type": "string"
},
"AnzHunde": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "number"
}
}
}
}
},
{
"type": "object",
"properties": {
"name": {
"type": "string"
},
"Gotsatz": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
},
{
"type": "object",
"properties": {
"name": {
"type": "string"
},
"Selbstbeteiligung": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
},
{
"type": "object",
"properties": {
"name": {
"type": "string"
},
"Nutzung": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
},
{
"type": "object",
"properties": {
"name": {
"type": "string"
},
"Hundehalterschutz": {
"type": "boolean"
}
}
}
]
},
"output": {
"type": "array",
"items": {
"type": "object",
"properties": {
"TextEinzel": {
"type": "string"
},
"BetragEinzel": {
"type": "number"
},
"TextAggregiert": {
"type": "string"
},
"BetragAggregiert": {
"type": "number"
}
}
}
}
}
}

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: JSON UPLOAD DOES NOT WORK: Required property "items" is not present or not a JSON obje

Hi mob,

 

I am not familiar with API part, but just from your Swagger, I think the issue here should be related with the 

 "items": [
{
"type": "object",

Part. 

If you specify the '"Type", then  

The value MUST be one of the Primitives, array or a model's id.

Please refer to the following article (at github) and see if it would help:

Swagger RESTful API Documentation Specification

Regards

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Highlighted
Community Support
Community Support

Re: JSON UPLOAD DOES NOT WORK: Required property "items" is not present or not a JSON obje

Hi mob,

 

I am not familiar with API part, but just from your Swagger, I think the issue here should be related with the 

 "items": [
{
"type": "object",

Part. 

If you specify the '"Type", then  

The value MUST be one of the Primitives, array or a model's id.

Please refer to the following article (at github) and see if it would help:

Swagger RESTful API Documentation Specification

Regards

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,198)