# OpenAPI string path variable failing schema validation, says it expects integer. Anyone see an issue with my spec?

**URL:** <https://community.postman.com/t/openapi-string-path-variable-failing-schema-validation-says-it-expects-integer-anyone-see-an-issue-with-my-spec/19566>\
**Category:** Help Hub\
**Tags:** variables, openapi\
**Created:** [January 26, 2021, 2:32pm UTC](https://community.postman.com/t/openapi-string-path-variable-failing-schema-validation-says-it-expects-integer-anyone-see-an-issue-with-my-spec/19566 "2021-01-26T14:32:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![briancook](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/briancook/32/7103_2.png) [@briancook](https://community.postman.com/u/briancook)\
**Post date:** [January 26, 2021, 2:32pm UTC](https://community.postman.com/t/openapi-string-path-variable-failing-schema-validation-says-it-expects-integer-anyone-see-an-issue-with-my-spec/19566/1 "2021-01-26T14:32:03Z")

</div>

I have an endpoint that I want to have a path variable that is a string. Here is the openAPI spec:

```
/companies/{COMPANY_ID}/communities/{STRING_TEST}/action-event-types/:
  get:
    parameters:
      - $ref: '#/components/parameters/companyIdQueryParam'
      - in: path 
        name: STRING_TEST
        schema:
          type: string
          example: test
        required: true
    responses:
      '200':
        description: Successful

```

Everything validates properly and I am able to successfully create a collection. But then when I try to send the endpoint, I get a schema validation issue saying:

The path variable “STRING\_TEST” needs to be of type integer, but we found “test”

Has anyone else run into this, and possibly have a solution?

Thanks

---

<div class="post-metadata">

**Author:** ![danny-dainton](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/danny-dainton/32/29401_2.png) [@danny-dainton](https://community.postman.com/u/danny-dainton)\
**Post date:** [April 29, 2025, 3:40pm UTC](https://community.postman.com/t/openapi-string-path-variable-failing-schema-validation-says-it-expects-integer-anyone-see-an-issue-with-my-spec/19566/2 "2025-04-29T15:40:15Z")

</div>


