question

AvinashNinamohina-3275 avatar image
0 Votes"
AvinashNinamohina-3275 asked ·

Error while saving Logic app custom connector of open api definition

I have created a logic app custom connector with an open definition file but its showing below error while saving and all the actions look perfect without any error.

{"Code":"","Message":"PUT https://logic-apim-eastus.management.azure-api.net/apis/75337ea703654c0487ac46688e8937ed?import=true&protocols=https&protocols=http&path=apim/75337ea703654c0487ac46688e8937ed&api-version=2014-02-14 failed with BadRequest, content={\"error\":{\"code\":\"ValidationError\",\"message\":\"One or more fields contain incorrect values:\",\"details\":[{\"code\":\"ValidationError\",\"target\":\"representation\",\"message\":\"Parsing error(s): Property 'requestBody' has not been defined and the schema does not allow additional properties. Path 'paths['/{connectionId}/api/claimdetails'].post.requestBody', line 22, position 22.\"},{\"code\":\"ValidationError\",\"target\":\"representation\",\"message\":\"Parsing error(s): JSON is valid against no schemas from 'oneOf'. Path 'paths['/{connectionId}/api/claimdetails'].post.responses.201', line 42, position 18.\"},{\"code\":\"ValidationError\",\"target\":\"representation\",\"message\":\"Parsing error(s): JSON is valid against no schemas from 'oneOf'. Path 'paths['/{connectionId}/api/claimdetails'].post.responses.400', line 52, position 18.\"},{\"code\":\"ValidationError\",\"target\":\"representation\",\"message\":\"Parsing error(s): JSON is valid against no schemas from 'oneOf'. Path 'paths['/{connectionId}/api/claimdetails'].post.responses.401', line 65, position 18.\"},{\"code\":\"ValidationError\",\"target\":\"representation\",\"message\":\"Parsing error(s): JSON is valid against no schemas from 'oneOf'. Path 'paths['/{connectionId}/api/claimdetails/{id}'].get.responses.200', line 112, position 18.\"},{\"code\":\"ValidationError\",\"target\":\"representation\",\"message\":\"Parsing error(s): JSON is valid against no schemas from 'oneOf'. Path 'paths['/{connectionId}/api/claimdetails/{id}'].get.responses.401', line 122, position 18.\"},{\"code\":\"ValidationError\",\"target\":\"representation\",\"message\":\"Parsing error(s): JSON is valid against no schemas from 'oneOf'. Path 'paths['/{connectionId}/api/claimdetails/{id}'].delete.responses.401', line 161, position 18.\"},{\"code\":\"ValidationError\",\"target\":\"representation\",\"message\":\"Parsing error(s): Property 'requestBody' has not been defined and the schema does not allow additional properties. Path 'paths['/{connectionId}/api/claimdetails/{id}'].put.requestBody', line 196, position 22.\"},{\"code\":\"ValidationError\",\"target\":\"representation\",\"message\":\"Parsing error(s): JSON is valid against no schemas from 'oneOf'. Path 'paths['/{connectionId}/api/claimdetails/{id}'].put.responses.200', line 216, position 18.\"},{\"code\":\"ValidationError\",\"target\":\"representation\",\"message\":\"Parsing error(s): JSON is valid against no schemas from 'oneOf'. Path 'paths['/{connectionId}/api/claimdetails/{id}'].put.responses.400', line 226, position 18.\"},{\"code\":\"ValidationError\",\"target\":\"representation\",\"message\":\"Parsing error(s): JSON is valid against no schemas from 'oneOf'. Path 'paths['/{connectionId}/api/claimdetails/{id}'].put.responses.401', line 239, position 18.\"},{\"code\":\"ValidationError\",\"target\":\"representation\",\"message\":\"Parsing error(s): JSON is valid against no schemas from 'oneOf'. Path 'paths['/{connectionId}/api/claimdetails/'].get.responses.200', line 271, position 18.\"},{\"code\":\"ValidationError\",\"target\":\"representation\",\"message\":\"Parsing error(s): JSON is valid against no schemas from 'oneOf'. Path 'paths['/{connectionId}/api/claimdetails/'].get.responses.401', line 284, position 18.\"},{\"code\":\"ValidationError\",\"target\":\"representation\",\"message\":\"Parsing error(s): Property 'openapi' has not been defined and the schema does not allow additional properties. Path 'openapi', line 307, position 12.\"},{\"code\":\"ValidationError\",\"target\":\"representation\",\"message\":\"Parsing error(s): Property 'components' has not been defined and the schema does not allow additional properties. Path 'components', line 308, position 15.\"},{\"code\":\"ValidationError\",\"target\":\"representation\",\"message\":\"Parsing error(s): The input OpenAPI file is not valid for the OpenAPI specificate https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md (schema https://github.com/OAI/OpenAPI-Specification/blob/master/schemas/v2.0/schema.json)."}]}}","Target":null,"Details":[],"Innererror":null}

azure-logic-apps
· 4
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @AvinashNinamohina-3275

Can you please confirm whether you are using the UI or not to create it?
If not looks like this open API spec is not valid and you can try to use swagger to validate it before using it.

0 Votes 0 · ·

Hi @AvinashNinamohina-3275

Want to touch base and see if you got a chance to look into my previous comment.

0 Votes 0 · ·

I am using Swagger UI to generate the Open API Swagger JSON file. Developed the API in VS2019 in .net core 3.1 version using API template and used Swagger 5.0 Nuget package. I did not validate it Please help me to validate the swagger. If possible I will share the Open API file regarding the API.
I have been using this API to update details in COSMOSDB its working fine and running this through Postman also providing results.


0 Votes 0 · ·
MayankBargali-MSFT avatar image MayankBargali-MSFT AvinashNinamohina-3275 ·

Hi @AvinashNinamohina-3275

Sure. Please send an email with the subject line “Attn:Mayank” to AzCommunity[at]Microsoft[dot]com referencing this thread along with your Azure subscription ID and swagger file. I will have a look at the file and update you with my findings.

0 Votes 0 · ·

0 Answers