FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Allow setting globalState.spec without Generate by derbylock · Pull Request #1174 · oapi-codegen/oapi-codegen · GitHub

Allow setting globalState.spec without Generate - #1174

Merged
jamietanna merged 1 commit into
oapi-codegen:masterfrom
derbylock:someInternalsExposure
Aug 23, 2023
Merged

Allow setting globalState.spec without Generate#1174
jamietanna merged 1 commit into
oapi-codegen:masterfrom
derbylock:someInternalsExposure

Conversation

derbylock commented Aug 3, 2023
edited
Loading

Copy link
Copy Markdown

We use oapi-codegen as a library.
E.g. we use public functions (e.g. codegen.OperationDefinitions()) inside our tool to make our specific additional code generation logic.
Currently the globalState.spec variable is used in refPathToGoType() and is set only in the Generate() function, so we have a panic when we use public functions without the Generate() invocation.

I suppose it is nice to have an ability to set the globalState.spec variable without the Generate() function invocation.

jamietanna self-requested a review August 18, 2023 09:11
jamietanna added this to the v1.14.0 milestone Aug 18, 2023

jamietanna commented Aug 18, 2023
edited
Loading

Copy link
Copy Markdown
Member

Looks interesting - I'll get a review shortly. I wasn't aware of anyone using the codegen functionality, without using the binary as-is, cool!

I notice that GitHub Actions hasn't triggered on this PR, which is odd 🤔

To allow consumers using oapi-codegen as a library.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL