Skip to content

Commit

Permalink
fix: resolve bodyArgName with . cause body cannot request.
Browse files Browse the repository at this point in the history
  • Loading branch information
xufeixiang committed Jun 27, 2024
1 parent 801fc10 commit 707e5c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/engine/datasource/openapi_datasourceconfiguration.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func (r *resolveDataSourceConfiguration) resolve(item *resolveItem) {

if item.requestBody.schema != nil {
bodyArgName := makeBodyArgumentName(item.requestBody.schema, item.operationId)
fetchConfig.Body = utils.MakePlaceHolderVariable(fmt.Sprintf(requestBodyFormat, bodyArgName))
fetchConfig.Body = utils.MakePlaceHolderVariable(fmt.Sprintf(requestBodyFormat, utils.NormalizeName(bodyArgName)))
fetchConfig.UrlEncodeBody = item.requestBody.contentType == echo.MIMEApplicationForm
}

Expand Down

0 comments on commit 707e5c5

Please sign in to comment.