---
title: "Discussion on \"OpenAPI enums vs const: closed lists, open-ended strings, and how to add a value without breaking clients\" | Hashnode"
description: "Discussion on \"OpenAPI enums vs const: closed lists, open-ended strings, and how to add a value without breaking clients\". An enum is a promise the server only accepts those values; a const is one fixed value; an open string accepts anything. Teams blur the three and ship a breaking change every time they add an option. Here is the decision table, extensible enums, and what codegen and AI callers do"
url: "https://hashnode.com/posts/openapi-enum-const-closed-open-ended/6aca07956ef8eab2379c9d68"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [OpenAPI enums vs const: closed lists, open-ended strings, and how to add a value without breaking clients](https://blogs.powerduck.com/openapi-enum-const-closed-open-ended?utm_source=hashnode&utm_medium=feed)

An enum is a promise the server only accepts those values; a const is one fixed value; an open string accepts anything. Teams blur the three and ship a breaking change every time they add an option. Here is the decision table, extensible enums, and what codegen and AI callers do

Oct 8 · 6 min read · blogs.powerduck.com  
Read the article

-   [#openapi](https://hashnode.com/tag/openapi)
-   [#json-schema](https://hashnode.com/tag/json-schema)
-   [#api-design](https://hashnode.com/tag/api-design)
-   [#best-practices](https://hashnode.com/tag/best-practices)

## Written by

[Powerduck](https://hashnode.com/@powerduck)

@powerduck · hon

  
[View profile](https://hashnode.com/@powerduck)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
