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

feat:Support for referencing types in different API files using format #1630

Merged
merged 1 commit into from
Mar 12, 2022
Merged

feat:Support for referencing types in different API files using format #1630

merged 1 commit into from
Mar 12, 2022

Conversation

chensylz
Copy link
Contributor

@chensylz chensylz commented Mar 9, 2022

maybe I just want to format api files

@chensylz
Copy link
Contributor Author

chensylz commented Mar 9, 2022

now I have this case

-root
- apis
- a.api
- b.api
main.api

main.api use
import "apis/a.api"
import "apis/b.api"

a.api use b.api type
such as
b.api
type A {}
a.api
type B { AList []A 'json:"a_list"' }

now, goctl api go --api /root/main.api functioning
but, goctl api format --dir /root don't work, raise can not found declaration 'A' in context

I just want to format api files, don't need check declare, because goctl api go will be help me out

@chensylz chensylz changed the title Support for referencing types in different API files using format feat:Support for referencing types in different API files using format Mar 11, 2022
@kevwan kevwan requested a review from kesonan March 12, 2022 06:37
@kevwan kevwan linked an issue Mar 12, 2022 that may be closed by this pull request
Copy link
Contributor

@kevwan kevwan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm.

@kevwan kevwan merged commit c55694d into zeromicro:master Mar 12, 2022
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.

goctl api format don't support import other api declare type
2 participants