Skip to content

gen: net.HardwareAddr does not satisfy comparable #1561

@archeoss

Description

@archeoss

What version of ogen are you using?

$ go list -m github.com/ogen-go/ogen

github.com/ogen-go/ogen v1.16.0

Can this issue be reproduced with the latest version?

Yes

What did you do?

This schema produces broken generated code

openapi: 3.0.0
info:
  title: AddressSetMacsDto
  version: 0.0.0
paths: 
  /address-set-macs:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddressSetMacsDto'
      responses:
        200:
          description: OK
components:
  schemas:
    AddressSetMacsDto:
      type: object
      properties:
        addresses:
          type: array
          items:
            type: string
            format: mac
          minItems: 1
          uniqueItems: true
      required:
        - addresses

What did you expect to see?

Working go build

What did you see instead?

$ go build './...'
# playground/go/api
api/oas_validators_gen.go:28:33: net.HardwareAddr does not satisfy comparable

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions