types:
  Metadata:
    type: map<string, optional<MetadataValue>>
    encoding:
      proto:
        type: google.protobuf.Struct

  MetadataValue:
    discriminated: false
    union:
      - double
      - string
      - boolean
      - list<MetadataValue>
    encoding:
      proto:
        type: google.protobuf.Value

  User:
    properties:
      id: string
      username: string
      email: optional<string>
      age: optional<uint>
      weight: optional<float>
      metadata: optional<Metadata>

  CreateUserResponse:
    properties:
      user: User

service:
  auth: false
  base-path: /
  transport:
    grpc:
      service-name: UserService
  endpoints:
    createUser:
      method: POST
      path: /users
      request:
        name: CreateUserRequest
        body:
          properties:
            username: string
            email: optional<string>
            age: optional<uint>
            weight: optional<float>
      response: CreateUserResponse

    getUser:
      method: GET
      path: /users
      request:
        name: GetUserRequest
        query-parameters:
          username: optional<string>
          age: optional<uint>
          weight: optional<float>
      response: User
