Skip to content

Validate OpenAPI spec before performing codegen#713

Draft
jamietanna wants to merge 2 commits into
oapi-codegen:mainfrom
jamietanna:feature/validate-spec
Draft

Validate OpenAPI spec before performing codegen#713
jamietanna wants to merge 2 commits into
oapi-codegen:mainfrom
jamietanna:feature/validate-spec

Conversation

@jamietanna

Copy link
Copy Markdown
Member

Although #544 couldn't have been caught by this, we may be able to flag
to users of cases where their OpenAPI is incorrect.

This is a draft because until
#373 is resolved, this may break
valid OpenAPI 3.1 specs.

Although oapi-codegen#544 couldn't have been caught by this, we may be able to flag
to users of cases where their OpenAPI is incorrect.
@jamietanna jamietanna added the ☢️ breaking change This change would break existing users' code label Aug 23, 2023
@jamietanna

Copy link
Copy Markdown
Member Author

Let's make it opt-in?

@mromaszewicz

Copy link
Copy Markdown
Member

I added something similar recently:
#2435

The PR above adds validation for catching codegen errors early and printing nice error messages, versus failing with compile errors later. Given that we have 3.1 support now, you might want to revisit this (but the same argument now holds for 3.2)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

☢️ breaking change This change would break existing users' code

Projects

Status: Maybe

Development

Successfully merging this pull request may close these issues.

2 participants