Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 1812: adds support for complex types with function scope #1813

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

KristofferFJ
Copy link

Describe the PR
Building on top of: #1283
Further support for function scoped types, we will now be able to define more complex request and responses in a function scope:

package main

// @Param request body main.Fun.request true "query params" 
// @Success 200 {object} main.Fun.response
// @Router /test [post]
func Fun()  {
	type request struct {
		Name string
	}
	
        type child struct {
                Name string
        }

	type response struct {
		Child child
	}
}

Relation issue
e.g. https://github.com/swaggo/swag/pull/118/files

Additional context
I do not have a lot of experience with this project, so any input is more than welcome.

@KristofferFJ
Copy link
Author

@ubogdan
Any chance you have some time to take a look at this?

@KristofferFJ KristofferFJ changed the title adds support for complex types with function scope Issue 1812: adds support for complex types with function scope Jun 20, 2024
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.

None yet

1 participant