Skip to content

Conversation

@stefanadranca
Copy link
Collaborator

Motivation:

Some IDL representations (SwiftProtobuf) store the methods and services documentation as preformatted strings containing the "///" and new lines. We need a case for this in the StructuredSwiftRepresentation and in the TextRenderer so we avoid double formatting. The responsability of providing already formatted comments for the services and methods should be of the user and not of the CodeGenLibrary.

Modifications:

  • created the new case in StructuredSwiiftrepresentation
  • handled the rendering of this case
  • modified tests

Result:

We are avoiding double formatting of documentation for services and methods ("/// ///")

Motivation:

Some IDL representations (SwiftProtobuf) store the methods and services documentation as preformatted strings containing the "///" and new lines. So we need a case in the SwiftStructuredRepresentation and in the TextRenderer. The responsability of providing already formatted comments for the services and methods should be of the user and not of the CodeGenLibrary.

Modifications:

- created the new case in StructuredSwiiftrepresentation
- handled the rendering of this case
- modified tests

Result:

Documentation for methoda and services should pe preformatted in any CodeGenerationRequest object so we avoid generating commenyts with double `///`.
@stefanadranca stefanadranca requested a review from glbrntt January 23, 2024 17:16
@glbrntt glbrntt merged commit f7f3d2d into grpc:main Jan 24, 2024
@glbrntt glbrntt added the version/v2 Relates to v2 label Jan 24, 2024
glbrntt pushed a commit to glbrntt/grpc-swift that referenced this pull request Feb 5, 2024
Motivation:

Some IDL representations (SwiftProtobuf) store the methods and services documentation as preformatted strings containing the "///" and new lines. So we need a case in the SwiftStructuredRepresentation and in the TextRenderer. The responsability of providing already formatted comments for the services and methods should be of the user and not of the CodeGenLibrary.

Modifications:

- created the new case in StructuredSwiiftrepresentation
- handled the rendering of this case
- modified tests

Result:

Documentation for methoda and services should pe preformatted in any CodeGenerationRequest object so we avoid generating commenyts with double `///`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

version/v2 Relates to v2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants