API Studio - Getting error "Not a valid parameter definition"

The parm in question is in the path.

When I expand all of the nodes the indication is

code: "OBJECT_MISSING_REQUIRED_PROPERTY" message: "Missing required property: $ref"

so...

1.) Does the editor validate against the actual URL when parsing the Swagger? (It would not be valid as the OpenAPI spec indicates the localhost for this endpoint which would not be on my machine.)

and

2.) I fully understand the $ref concept to ref another object within the OpenAPI spec doc - but what $ref can I provide in this situation?

0 5 1,195
5 REPLIES 5

@ron ,

1.) Does the editor validate against the actual URL when parsing the Swagger?

You mean by making an API call ? No, It doesn't.

2.) I fully understand the $ref concept to ref another object within the OpenAPI spec doc - but what $ref can I provide in this situation?

See similar discussion here in github issue queue. Keep us posted if you still see any issue.

I am still struggling with this. The actual OpenAPI doc came from one of our API developers, so what I have done is start from scratch, copying blocks of their OpenAPI doc one at a time to see the impact...

In their actual doc they defined each parameter within each path/verb - even though most of the parameters they use within the definitions are duplicates of those defined in other paths/verbs. I have taken the approach of defining the parms within a 'parameters' object and made $ref's to them as they are called out.

For example, here is my current 'parameters' object:

parameters:
  id:
    name: id
    description: Claim Input Request to getClaimSummaries and Details.
    in: path
    type: string
    required: true
  Nw-Session-Id:
    name: Nw-Session-Id
    in: header
    description: SessionId
    type: string
    required: false
    pattern: '^[a-zA-Z0-9_-]+$'
  Nw-User-Id:
    name: Nw-User-Id
    in: header
    description: Memberuserid
    type: string
    required: false
    pattern: '^[a-zA-Z0-9_-]+$'

here is an example of where some of the parms defined globally are used (note the line numbers as that will be significant):

2630-2016-05-05-8-54-07.jpg

However, in this subsequent block, one of those parms is referenced as in other path objects, but note the error pane (this is the only occurrence of that object reference to get the errors)...

2631-2016-05-05-9-01-53.jpg

The error pane:

2632-2016-05-05-9-03-30.jpg

It seems that my images have not been kept in my post.

I will try again...

Anyone have input here? Is there something I can try to explain better?

@ron , Can you share the link to the openApi Studio URL / share the complete openApi spec to reproduce same ?