Skip to content

Change generated code to start function comment with the function name#1128

Merged
1 commit merged intooapi-codegen:masterfrom
alexandear-org:change-generated-comment-with-body
Jul 28, 2023
Merged

Change generated code to start function comment with the function name#1128
1 commit merged intooapi-codegen:masterfrom
alexandear-org:change-generated-comment-with-body

Conversation

@alexandear
Copy link
Copy Markdown
Contributor

@alexandear alexandear commented Jun 28, 2023

This PR changes generated comments for client functions: append WithBody or WithResponse:

Before:

// AddThing request with any body
AddThingWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

// PostBoth request with any body
PostBothWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostBothResponse, error)

After:

// AddThingWithBody request with any body
AddThingWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

// PostBothWithBodyWithResponse request with any body
PostBothWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostBothResponse, error)

@alexandear alexandear changed the title Generated comment name is the same as function name Function comment should start with the function name Jun 28, 2023
@alexandear alexandear changed the title Function comment should start with the function name Start function comment with the function name Jun 28, 2023
@alexandear alexandear changed the title Start function comment with the function name Change generated code to start function comment with the function name Jun 28, 2023
@alexandear alexandear force-pushed the change-generated-comment-with-body branch from b5fafc9 to 33a352d Compare June 28, 2023 13:06
@ghost ghost merged commit 9174fec into oapi-codegen:master Jul 28, 2023
@alexandear alexandear deleted the change-generated-comment-with-body branch July 29, 2023 08:50
debuggerpk pushed a commit to breuHQ/oapi-codegen that referenced this pull request Sep 18, 2023
danicc097 pushed a commit to danicc097/oapi-codegen that referenced this pull request Aug 31, 2024
This pull request was closed.
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.

1 participant