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

Special type and cross package support #109

Closed
tx991020 opened this issue May 4, 2018 · 21 comments · Fixed by #111
Closed

Special type and cross package support #109

tx991020 opened this issue May 4, 2018 · 21 comments · Fixed by #111
Labels

Comments

@tx991020
Copy link

tx991020 commented May 4, 2018

http://oq1xuulg6.bkt.clouddn.com/97c3b42fbc5bebf327293a31f98a0204.jpg

@pei0804
Copy link
Member

pei0804 commented May 5, 2018

How do you have struct field in dao.Product?

@tx991020
Copy link
Author

tx991020 commented May 5, 2018

dao.Product like this

@tx991020
Copy link
Author

tx991020 commented May 5, 2018

@pei0804
Copy link
Member

pei0804 commented May 5, 2018

What is JSON TIME?
If it is a library, please give me a URL.

@pei0804
Copy link
Member

pei0804 commented May 5, 2018

OK
I fix it.
#111

@pei0804
Copy link
Member

pei0804 commented May 5, 2018

Please wait for marge.

@tx991020
Copy link
Author

tx991020 commented May 5, 2018

@pei0804 type JSONTime struct {T time.Time}

@pei0804
Copy link
Member

pei0804 commented May 6, 2018

I see.

@easonlin404
Copy link
Member

@tx991020 please reopen it if you have any problems.

@tx991020
Copy link
Author

tx991020 commented May 7, 2018

@pei0804
Copy link
Member

pei0804 commented May 8, 2018

Did you finished update?

go get -u github.com/swaggo/swag/cmd/swag

@tx991020
Copy link
Author

tx991020 commented May 8, 2018

@pei0804 @easonlin404 I have finished update . the bug already exist

@pei0804
Copy link
Member

pei0804 commented May 8, 2018

I'll Check.

@pei0804 pei0804 reopened this May 8, 2018
@easonlin404 easonlin404 added the bug label May 9, 2018
@1yzz
Copy link

1yzz commented May 12, 2018

a.go

package a
struct user {
  name string
}

b.go

package b
struct response {
admin user // contains another type here
}
package b
// @Tags post
// @Accept json
// @Produce json
// @Success 200 {object} response
// @Router /post/ [get]

will the code above be the case supported???

@pei0804
Copy link
Member

pei0804 commented May 12, 2018

sorry.
cross package import not support.

@1yzz
Copy link

1yzz commented May 12, 2018

Is there a way i can bypass this restriction to achieve the goal as said before in last comment?

@pei0804
Copy link
Member

pei0804 commented May 12, 2018

@tx991020
You use the type prepared by the standard. So, I'm creating plugin for same like issue.

@pei0804
Copy link
Member

pei0804 commented May 12, 2018

@edmundluk3
This case very difficult. Now best practice is one package model.

@pei0804 pei0804 changed the title panic: not supported 'astSelectorExpr' yet, how to use swag post ? Special type and cross package support May 13, 2018
@pei0804 pei0804 added feature and removed bug labels May 13, 2018
pei0804 added a commit that referenced this issue May 28, 2018
@pei0804
Copy link
Member

pei0804 commented Jul 22, 2018

I create now.
#164
wait plz.

@pei0804 pei0804 closed this as completed Jul 22, 2018
@pei0804 pei0804 reopened this Jul 22, 2018
@pei0804
Copy link
Member

pei0804 commented Jul 22, 2018

I created PR for cross package.
#171

@pei0804
Copy link
Member

pei0804 commented Sep 1, 2018

@abdulito fixed this case!
#198

@pei0804 pei0804 closed this as completed Sep 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants