Ask a Question

Import API - Unexpected attribute areas

Matus
Occasional Contributor

Import API - Unexpected attribute areas

If I want import API definition index.yaml:

 

 

info:
  title: FOUREYES BUSINESS API
  version: '1.0'

topics:
  - $ref: error.yaml
  - $ref: common.yaml

areas:
  - $ref: changesets.yaml
  - $ref: changeset-decisions.yaml
  - $ref: target-system-changesets.yaml

 

 ReadyAPI return error: 

  • Fri Nov 25 14:14:14 CET 2022: ERROR: attribute topics is unexpected attribute areas is unexpected attribute swagger is missing attribute paths is missing
1 REPLY 1
richie
Community Hero

Hi @Matus,

Whenever i've had problems importing an OAS/Swagger it's been due to one of two reasons, either:

I was trying to import an OAS/Swagger of version not supported by ReadyAPI!'s import tool

OR

The OAS/Swagger contained errors.

ReadyAPI used to support swagger v1.0 and v2.0 and OAS v3.0. I think OAS v3.0.3 is the latest OAS, but looking at your error detail i think you have 3 errors in there....attribute topics and attribute areas are unexpected and your attraibute paths is missing.

Have you opened your yaml in https://swagger.io ?

I'd suggest having a look in there....swagger.io is pretty good at identifying errors so you can fix them.

Cheers,

Rich

if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta
cancel
Showing results for 
Search instead for 
Did you mean: