Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I had errors of
Unimplemented, Content with not exactly 1 option.
and I thought I will quickly fix this.The change was done as part of golemcloud/golem#1049
CLI can do
serde_json::from_str(a_yaml_file)
and use the the REST API with content-type as json itself. So this is not for golem-cli to work with latest changes that support YAML, but rather make this client generation successful without compromising the details in the spec (refer the other PR). That is, in the PR, golem-service.yaml has details of API-definition import that says it supports both xml and json.With this new spec, the client generation failed with an error mentioned above. This PR is just enough reasonable changes to get over this problem. Currently it supports multiple content type for 1 single endpoint handling only
yaml
orjson
. If anyone needs more , they can add. Hopefully this scenario is not going to come often.The changes are tested and now works: the branch is in use in PR Yaml support for API definition golem#1049
TODO