Forum Discussion
ponelat
4 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
- 3 months ago
- 10 months ago
- 6 years ago
Recent Discussions
- 2 days ago
- 2 days ago
- 19 days ago