oapi-codegen icon indicating copy to clipboard operation
oapi-codegen copied to clipboard

feat(exclude-package-go-type): impl

Open zdunecki opened this issue 5 months ago • 2 comments

Hi,

It's a concept only but we need this at @livesession. The case is like that:

Let's say we have a core structures defined schema.yaml in our core golang package and want to reuse that so we have to:

generate ./schema.yaml inside our core package then in our api we need to import that schemas to our openapi and based on that schema generate a golang server too We would like to have references to core instead of a new objects. Plus we want to have schema.gen.go inside core package.

Why it's needed? Because x-go-type overwrite what type is generated so using this method inside core package we would get types that does not exists. If we use that from api perspective (which use core it's fine cuz the references are already generated)

zdunecki avatar Sep 05 '25 18:09 zdunecki

Kusari Inspector

Kusari Analysis Results:

Proceed with these changes
✅ No Flagged Issues Detected All values appear to be within acceptable risk parameters.

No pinned version dependency changes, code issues or exposed secrets detected!

@kusari-inspector rerun - Trigger a re-analysis of this PR @kusari-inspector feedback [your message] - Send feedback to our AI and team See Kusari's documentation for setup and configuration. Commit: db2c6aa1efe58b1b9a28e5433314d1a8f2e6cca0, performed at: 2025-09-05T18:58:57Z

Found this helpful? Give it a 👍 or 👎 reaction!

kusari-inspector[bot] avatar Sep 05 '25 18:09 kusari-inspector[bot]

Kusari PR Analysis rerun based on - db2c6aa1efe58b1b9a28e5433314d1a8f2e6cca0 performed at: 2025-09-05T20:24:10Z - link to updated analysis

kusari-inspector[bot] avatar Sep 05 '25 20:09 kusari-inspector[bot]