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

Should I expect embedded structs to be supported in generated spec files? #2980

Open
bsamek opened this issue Oct 24, 2023 · 2 comments
Open
Labels
generate spec Related to spec generation from code scanner

Comments

@bsamek
Copy link

bsamek commented Oct 24, 2023

Problem statement

Should I expect embedded structs to be supported in generated spec files?

Details

I added this commit to my project, which includes a minimal swagger config and the results of running the generator. The embedded structs do not have types in the generated swagger config. For example, APITask's AbortInfo does not have a type. I am using swagger:route, swagger:meta, and swagger:response.

Steps to reproduce

git clone git@github.com:evergreen-ci/evergreen.git
git checkout bsamek/swagger
SWAGGER_GENERATE_EXTENSION=false swagger generate spec -o ./swagger.yml
@casualjim
Copy link
Member

Can you change this:

// swagger:route GET /tasks getTask
// responses:
//   200: taskResponse

to this:

// swagger:route GET /tasks getTask
// responses:
//   200: body:taskResponse

bsamek added a commit to evergreen-ci/evergreen that referenced this issue Oct 24, 2023
@bsamek
Copy link
Author

bsamek commented Oct 24, 2023

@casualjim That has the effect of changing the path section, but not the response section evergreen-ci/evergreen@64a116b

@fredbi fredbi added the scanner label Dec 1, 2023
@fredbi fredbi added the generate spec Related to spec generation from code label Dec 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
generate spec Related to spec generation from code scanner
Projects
None yet
Development

No branches or pull requests

3 participants