-
Notifications
You must be signed in to change notification settings - Fork 125
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
Emit JSON path reference in comments for all generated types #196
Emit JSON path reference in comments for all generated types #196
Conversation
Sources/_OpenAPIGeneratorCore/Translator/Parameters/translateParameter.swift
Outdated
Show resolved
Hide resolved
Sources/_OpenAPIGeneratorCore/Translator/RequestBody/translateRequestBody.swift
Outdated
Show resolved
Hide resolved
Sources/_OpenAPIGeneratorCore/Translator/RequestBody/translateRequestBody.swift
Outdated
Show resolved
Hide resolved
Sources/_OpenAPIGeneratorCore/Translator/RequestBody/translateRequestBody.swift
Outdated
Show resolved
Hide resolved
Sources/_OpenAPIGeneratorCore/Translator/Responses/translateResponseHeader.swift
Outdated
Show resolved
Hide resolved
Sources/_OpenAPIGeneratorCore/Translator/Responses/translateResponse.swift
Outdated
Show resolved
Hide resolved
Sources/_OpenAPIGeneratorCore/Translator/Responses/translateResponse.swift
Outdated
Show resolved
Hide resolved
Sources/_OpenAPIGeneratorCore/Translator/Responses/translateResponseHeader.swift
Outdated
Show resolved
Hide resolved
Sources/_OpenAPIGeneratorCore/Translator/Responses/translateResponseOutcome.swift
Outdated
Show resolved
Hide resolved
Sources/_OpenAPIGeneratorCore/Translator/TypeAssignment/TypeName.swift
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is definitely the right direction! Added a few comments, we can get this PR cleaned up and landed, and then you can continue to address any remaining missing comments in a separate PR.
Co-authored-by: Honza Dvorsky <[email protected]>
Thanks for the quick confirmation! The fix is still incomplete, but I just put in something that can be applied immediately. |
@swift-server-bot add to allowlist |
Sure – can you please just resolve the CI failures and we could land this PR? Then you can continue to work on the missing bits in a separate PR. |
- fix around `responseKind` - make `isComponent` more reliable - add comment for some methods and property. - addjust soundness
@czechboy0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few more stylistic nits to ensure better readability.
Sources/_OpenAPIGeneratorCore/Translator/RequestBody/translateRequestBody.swift
Outdated
Show resolved
Hide resolved
Sources/_OpenAPIGeneratorCore/Translator/RequestBody/translateRequestBody.swift
Outdated
Show resolved
Hide resolved
Sources/_OpenAPIGeneratorCore/Translator/Responses/translateResponse.swift
Outdated
Show resolved
Hide resolved
Sources/_OpenAPIGeneratorCore/Translator/Responses/translateResponse.swift
Outdated
Show resolved
Hide resolved
Sources/_OpenAPIGeneratorCore/Translator/Responses/translateResponse.swift
Outdated
Show resolved
Hide resolved
Sources/_OpenAPIGeneratorCore/Translator/Responses/translateResponseHeader.swift
Outdated
Show resolved
Hide resolved
Sources/_OpenAPIGeneratorCore/Translator/TypeAssignment/TypeName.swift
Outdated
Show resolved
Hide resolved
Co-authored-by: Honza Dvorsky <[email protected]>
I open this issue #206 . (I don't mind if you change the charge to me) |
@takeshi-1000 I pushed a few more changes to your branch and will now merge once CI lands. Thanks for taking this on! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated with one more commit, lgtm.
Thank you for suporting! |
Motivation
Resolve #13
Modifications
Applied commentable to the declaration variable in Traslator so that a comment in Types.swift is added indicating that it was generated from the Json path of the openapi document
Result
Some comments in Types.swift is generated, like
Tests/OpenAPIGeneratorReferenceTests/Resources/ReferenceSources/Petstore/Types.swift
.Test Plan
Modify Type.swift in the reference source