Skip to content

add support for ULID to swagger:strfmt #2467

@elipavlov

Description

@elipavlov

Problem statement

It's great that we have feature like string format for the UUID strings which described here:
https://goswagger.io/use/spec/strfmt.html

Recently i've learnt about ULID identity provider:
https://github.com/ulid/spec

My proposal is to add the same mechanic for the ULID format as for UUID.

Swagger specification

Examples would be:

---
definitions:
  user:
    properties:
      id:
        type: string
        format: ulid
---
definitions:
  ULIDType:
    type: string
    format: ulid
  User:
    properties:
      id:
        $ref: '#/definitions/ULIDType'

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions