Spec Annotations

UIGen supports a set of x-uigen-* vendor extensions that let you customise the generated UI directly from your OpenAPI or Swagger spec. These annotations are optional (UIGen works without them) but they give you fine-grained control over labels, identifiers, and behaviour.

Available annotations

Annotation Purpose Status
x-uigen-app App name, icon, and branding Available
x-uigen-label Override the display label for a field, operation, or resource Available
x-uigen-id Override the stable identifier used for overrides Available
x-uigen-ignore Exclude specific operations or entire resources from the generated UI Available
x-uigen-ref Declare that a field references another resource with full control over resolution and display Available
x-uigen-chart Configure charts for list endpoints that return array data Available
x-uigen-layout Control page layout (sidebar, centered, dashboard grid) Available
x-uigen-profile Mark a resource as a user profile view Available
x-uigen-landing-page Generate a marketing landing page at / Available
x-uigen-datetime Format datetime fields in list and detail views Available
x-uigen-datetime-tz Display datetimes in a specific timezone Available
x-uigen-auth Configure OAuth2 and authentication flows Available
x-uigen-http-get/post/put/delete/patch Override HTTP method during config reconciliation Available
x-uigen-file-types Array of allowed MIME types for file uploads Available
x-uigen-max-file-size Maximum file size in bytes for file uploads Available
x-uigen-login Mark an endpoint as the credential login endpoint Available
x-uigen-token-path Dot-notation path to the token in a login response Available
x-uigen-widget Override the field input component Coming Soon
x-uigen-hidden Hide a field from the generated UI Coming Soon
x-uigen-order Control field ordering in forms and tables Coming Soon

Where annotations are supported

Annotations can be placed at different levels of the spec:

  • Schema property: affects a single field
  • Schema object: affects all fields in a schema
  • Path item: affects all operations on a path
  • Operation: affects a single operation

Precedence

When the same annotation appears at multiple levels, the most specific level wins:

Operation > Path item > Schema property > Schema object

Swagger 2.0 support

All x-uigen-* annotations work in Swagger 2.0 documents in the same way as OpenAPI 3.x.