# Using enum $ref in parameter gives error in the collection for OpenAPI 3.0

**URL:** <https://community.postman.com/t/using-enum-ref-in-parameter-gives-error-in-the-collection-for-openapi-3-0/9344>\
**Category:** Help Hub\
**Tags:** api, openapi\
**Created:** [November 29, 2019, 3:32pm UTC](https://community.postman.com/t/using-enum-ref-in-parameter-gives-error-in-the-collection-for-openapi-3-0/9344 "2019-11-29T15:32:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![prince.bansal](https://avatars.discourse-cdn.com/v4/letter/p/9e8a1a/32.png) [@prince.bansal](https://community.postman.com/u/prince.bansal)\
**Post date:** [November 29, 2019, 3:32pm UTC](https://community.postman.com/t/using-enum-ref-in-parameter-gives-error-in-the-collection-for-openapi-3-0/9344/1 "2019-11-29T15:32:27Z")

</div>

I have defined my api using OpenAPi 3.0 spec and when I use $ref in parameter, it doesn’t generates the parameter properly in the collection, infact gives an error message in the parameter value.  
Here’s what I am doing in the spec:  
…  
parameters:  
- name: categoryName  
in: query  
description: Name of the category  
schema:  
$ref: “#/components/schemas/VisaCategory”  
- name: visaTypeName  
in: query  
description: Visa Type  
schema:  
$ref: “#/components/schemas/VisaType”  
components:  
schemas:  
VisaCategory:  
type: string  
enum:  
- TOURIST  
- BUSINESS  
- WAIVER  
VisaType:  
type: string  
enum:  
- SINGLE  
- MULTIPLE  
- DOUBLE  
- MULTIPLE\_6\_MONTHS  
- MULTIPLE\_1\_YEAR  
…

When I generate the collection, I get this error:  
{{baseUrl}}/visa-info?categoryName={“value”:“reference #/components/schemas/VisaCategory not found in the api spec”}&visaTypeName={“value”:“reference #/components/schemas/VisaType not found in the api spec”}

The same enum can be reference for response spec. Please help me out.
