Skip to content

Bad codegen for HEAD verb #95

Description

@brjohnsn

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions