Forum Discussion

Matus's avatar
Matus
Occasional Contributor
2 years ago

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

  • richie's avatar
    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