Forum Discussion
ponelat
3 years agoStaff
Hi ahtahkr
You should be able to use `black` and not `blackenum`, it sounds like a typo.
Here is a minimal example, see if it helps...
openapi: 3.0.0
info:
title: Test API
version: 1.0.0
paths:
/color/{color}:
get:
description: Get the hex of a color
parameters:
- name: color
schema:
$ref: '#/components/schemas/Color'
required: true
in: path
responses:
default:
description: Hex code of a color.
content:
application/json:
schema:
type: string
example: '#112233'
components:
schemas:
Color:
type: string
enum:
- black
- brown
- red
- blue
Related Content
- 2 years ago
- 6 months ago
Recent Discussions
- 4 days ago
- 26 days ago