jbowes/oag

Reserved keyword names cause compilation errors.

Closed this issue · 0 comments

When using a reserved keyword as an argument name, it will cause compilation errors.

  /users:
    get:
      summary: List users
      parameters:
        - name: type
          in: query
          type: string
          enum: [api]
          required: true

This tries to make the following List function:

List(ctx context.Context, type string, …) …

This causes the compiler to fail seeing that type is a reserved keyword.