krisrajz
2 years agoNew Contributor
Could not resolve reference - invalid error
This is my schema with no reference to inventorySystem but I keep getting the error: Could not resolve the reference #/components/schemas/inventorySystem at line no 60 though it has only 55 lines! Any help would be much appreciated.
openapi: 3.0.0
servers:
# Added by API Auto Mocking Plugin
- description: SwaggerHub API Auto Mocking
url: https://virtserver.swaggerhub.com/KRISRAJZ/Customer/1.0.0
info:
description: This is an API for HPlus Sport Customers
version: "1.0.0"
title: Customers API
contact:
email: you@yhplussport.com
license:
name: Apache 2.0
url: 'http://www.apache.org/licenses/LICENSE-2.0.html'
tags:
- name: customer
description: customer related calls
paths:
/customer:
get:
tags:
- customer
summary: searches customer
operationId: searchCustomer
description: |
By passing in the appropriate options, you can search for
available customer in the system
responses:
'200':
description: search results matching criteria
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Customer'
'400':
description: bad input parameter
components:
schemas:
Customer:
type: object
required:
- name
- customerNumber
properties:
customerNumber:
type: string
example: 'Cus001'
name:
type: string
example: 'Raj'
phone:
type: string
example: '728-234-234'
krisrajz Hi
I can't reproduce the issue.
The script is clear from errors by me:
maybe you should restart / refresh your session?