-
Notifications
You must be signed in to change notification settings - Fork 435
Brought CodeRenderer from OpenAPI Generator. #1728
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
Conversation
Motivation: Provides an API which takes Structured Swift Representation of a file and generates an object containing the generated code as a String. Modifications: - Brought over RendererProtocol and TextBasedRenderer. - Brought over unit tests in Test_TextBasedRenderer. - Fixed TypeName bugs that produced errors while building. Result: The CodeGenLib will have a code renderer that transforms `StructuredSwiftRepresentation` into `SourceFile`.
| @@ -0,0 +1,781 @@ | |||
| /* | |||
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.
GRPCTests are tests for v1. Since GPRCCodeGen is a new target for v2, it should have its own corresponding test target GRPCCodeGenTests.
Package.swift
Outdated
| .nioTransportServices, | ||
| .logging, | ||
| .reflectionService, | ||
| .grpcCodeGen |
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 should be removed
Package.swift
Outdated
| .protocGenGRPCSwift, | ||
| .grpcSwiftPlugin, | ||
| .reflectionService, | ||
| .grpcCodeGen, |
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.
nit: move this down to the // v2 section below .grpcCore.
| @@ -0,0 +1,781 @@ | |||
| /* | |||
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.
re: filename, I know you copy-pasted from OpenAPI, but naming is generally <Foo>Tests.swift, this should be TextBasedRendererTests.swift. We're also trying to keep the hierarchy of library and test code the same so it should be GRPCCodeGenTests/Internal/Renderer/TextBasedRendererTests.swift.
Motivation:
Provides an API which takes Structured Swift Representation of a file and generates an object containing the generated code as a String.
Modifications:
Result:
The CodeGenLib will have a code renderer that transforms
StructuredSwiftRepresentationintoSourceFile.