cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
shanekw
Level: Powered On

Custom connector: "Specified file does not match OpenAPI 2.0 specification" but error message is asking for OpenAPI 3.0 structure

The error that I'm getting:

Specified file does not match OpenAPI 2.0 specification: 'String '' does not match regex pattern '^[^{}/ :\\]+(?::\d+)?$'. Path 'host'., JSON is valid against no schemas from 'oneOf'. Path 'paths./User.get.responses.200'., Property 'openapi' has not been defined and the schema does not allow additional properties. Path 'openapi'., Property 'servers' has not been defined and the schema does not allow additional properties. Path 'servers'., Property 'components' has not been defined and the schema does not allow additional properties. Path 'components'.'

 

I'm using the OpenAPI 2.0 structure as defined here: https://swagger.io/docs/specification/2-0/basic-structure/ so this error makes absolutely no sense. I have also tried uploading an OpenAPI 3.0 formatted file, and get the exact same error. Please advise.

3 REPLIES 3
Community Support Team
Community Support Team

Re: Custom connector: "Specified file does not match OpenAPI 2.0 specification" but error message is asking for OpenAPI 3.0 structure

Hi @shanekw ,

 

The swagger spec says the host can only be a hostname or ip address. It does not support path.
If you want to use a subdirectory then look into the basePath property.

Could you please reference:

https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#responsesObject

 

Best Regards.

Yumia

shanekw
Level: Powered On

Re: Custom connector: "Specified file does not match OpenAPI 2.0 specification" but error message is asking for OpenAPI 3.0 structure

I am using a hostname. Please see my openapi (v2 and v3) config (in docx file because of upload requirements).

shanekw
Level: Powered On

Re: Custom connector: "Specified file does not match OpenAPI 2.0 specification" but error message is asking for OpenAPI 3.0 structure

@v-yuxima-msft I don't know if something changed but it's working now without any changes on my end.