elastic / elastic/cloud-sdk-go

Update cloud metadata sending invalid request body

Open
#365 0 comments 0 reactions 0 assignees View on GitHub
Team:Delivery
Dominant language
Go
Stars
23
Forks
52
PR merge metrics
No merged PRs in 30d

Description

## Readiness Checklist

- [ ] I am running the latest version
- [ ] I checked the documentation and found no answer
- [x] I checked to make sure that this issue has not already been filed
- [x] I am reporting the issue to the correct repository (for multi-repository projects)

## Expected Behavior

SDK should send the correct request body without extra fields

## Current Behavior

Update deployment metadata is sending field `last_resource_plan_modified` which is not part of the request schema.

```
Detected unexpected fields for [no.found.adminconsole.api.v1.routes.deployments.models.DeploymentUpdateRequest.DeploymentUpdateMetadata], not failing as strict deserialization has been disabled

io.circe.DecodingFailure$$anon$2: Unexpected field: [last_resource_plan_modified]; valid fields: system_owned, hidden, tags: DownField(metadata)
```

The request being made is to `PUT /api/v1/deployments/{deployment_id}` with user agent `cloud-sdk-go/2.10.0`

## Possible Solution

## Steps to Reproduce

1.
2.
3.
4.

## Context

## Your Environment

* Version used:
* Environment name and version (e.g. Go 1.9):
* Server type and version:
* Operating System and version:
* Link to your project:

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.