Skip to content

Conversation

@taiki-fw
Copy link
Contributor

@taiki-fw taiki-fw commented Nov 28, 2023

Summary

I would like to fix the problem that validation error occurs if the validation of value is an object when defining examples with parameters such as integer in schema as shown in the official example.

Test Plan

Add an integer instead of an object to examples in test/api.test.domain/index.yml

parameters:
        - in: query
          name: from.publishedAt
          schema:
            type: integer
            format: int32
          examples:
            example1:
              value: 20231119
            example2:
              value: 20240101

pnpm run test:code:gen succeeds!

@taiki-fw taiki-fw marked this pull request as ready for review November 28, 2023 15:52
@Himenon Himenon changed the title Fix parameters examples value validation fix: parameters examples value validation Nov 29, 2023
@Himenon Himenon merged commit ef946bd into Himenon:main Nov 29, 2023
@Himenon
Copy link
Owner

Himenon commented Nov 29, 2023

@taiki-fw

Thank you Contirbute, I have released it with v0.27.3!

https://github.com/Himenon/openapi-typescript-code-generator/releases/tag/%40himenon%2Fopenapi-typescript-code-generator%400.27.3

@taiki-fw taiki-fw deleted the fix/parameters-examples-value-type branch January 13, 2024 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants