Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support multiple content types #26

Merged
merged 7 commits into from
Nov 5, 2024
Merged

Support multiple content types #26

merged 7 commits into from
Nov 5, 2024

Conversation

afsalthaj
Copy link
Contributor

@afsalthaj afsalthaj commented Nov 4, 2024

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 or json. 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

  • Cleanup

@afsalthaj
Copy link
Contributor Author

Part of #1035

@afsalthaj afsalthaj marked this pull request as ready for review November 5, 2024 03:35
@afsalthaj afsalthaj merged commit ed39f9c into master Nov 5, 2024
2 checks passed
@afsalthaj afsalthaj deleted the support_yaml branch November 5, 2024 09:07
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.

2 participants