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

Swagger: WatchGameServer() definition is not generated properly in sdk.swagger.json #1106

Closed
aLekSer opened this issue Oct 10, 2019 · 4 comments
Labels
area/build-tools Development tooling. I.e. pretty much everything in the `build` directory. kind/bug These are bugs.
Milestone

Comments

@aLekSer
Copy link
Collaborator

aLekSer commented Oct 10, 2019

There is an issue with v1.5.0 version of GRPC Gateway library which is used to generate sdk.swagger.json file.

What happened:

Test I created in #1079 could not parse properly the newline terminated JSONs stream which is a response to gameserver/watch endpoint.
Investigation of this issue source and ways of retaliation could be found in the #1079 ticket.

What you expected to happen:
Properly sdk.swagger.json should be generated.

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:
We could update the GRPC Gateway to the most recent version in Agones repo.
I have attached the version of sdk.swagger.json which was generated with it.

Environment:

  • Agones version: 1.0
  • Kubernetes version (use kubectl version): N/A
  • Cloud provider or hardware configuration: N/A
  • Install method (yaml/helm): N/A
  • Troubleshooting guide log(s):
  • Others:
@aLekSer aLekSer added the kind/bug These are bugs. label Oct 10, 2019
@aLekSer
Copy link
Collaborator Author

aLekSer commented Oct 10, 2019

One more issue which we should tackle after upgrading GRPC-gateway is that there is no swagger generators which would properly generate go client for the x-stream-definitions:

  "x-stream-definitions": {
    "sdkGameServer": {
      "type": "object",
      "properties": {
        "result": {
          "$ref": "#/definitions/sdkGameServer"
        },
        "error": {
          "$ref": "#/definitions/runtimeStreamError"
        }
      },
      "title": "Stream result of sdkGameServer"
    }
  }

@aLekSer
Copy link
Collaborator Author

aLekSer commented Oct 10, 2019

Attaching sdk.swagger.json generated with the most recent version of GRPC Gateway.
For you to compare:

    "/watch/gameserver": {
      "get": {
        "summary": "Send GameServer details whenever the GameServer is updated",
        "operationId": "WatchGameServer",
        "responses": {
          "200": {
            "description": "A successful response.(streaming responses)",
            "schema": {
              "$ref": "#/x-stream-definitions/sdkGameServer"
            }
          }
        },
        "tags": [
          "SDK"
        ]
      }
    }

sdk.swagger.json.txt

@markmandel
Copy link
Member

I think we can close this now, yes?

I have a working client for this, both Go and Unity (#1234).

@markmandel markmandel added the area/build-tools Development tooling. I.e. pretty much everything in the `build` directory. label Jan 22, 2020
@markmandel markmandel added this to the 1.4.0 milestone Jan 22, 2020
@markmandel
Copy link
Member

Going to close this, I think this is now fixed. Please reopen if it's still an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/build-tools Development tooling. I.e. pretty much everything in the `build` directory. kind/bug These are bugs.
Projects
None yet
Development

No branches or pull requests

2 participants