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

Bad codegen for HEAD verb #95

Open
brjohnsn opened this issue Apr 1, 2018 · 0 comments
Open

Bad codegen for HEAD verb #95

brjohnsn opened this issue Apr 1, 2018 · 0 comments
Labels

Comments

@brjohnsn
Copy link

brjohnsn commented Apr 1, 2018

Given the following resource definition, the code generated for the Go client does not compile and the code generated for the server returns a message body.

//
// Determines whether record exists for a given ID.
//
resource Any HEAD "/status/{id}" {
  Int64 id;
  expected OK; // Matching entry found
  exceptions {
    ResourceError NOT_FOUND; // No entry found
  }
}

The generated server code can be forced to return no message body if the expected result is changed to NO_CONTENT. However the client code still does not compile in this case. The only way to get generated code with behavior similar to that expected with the HEAD verb is to change the verb to GET and the expected result to NO_CONTENT.

@boynton boynton added the bug label Jun 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants