GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — The `deprecated` field from OpenAPI operations is parsed but not exposed to templates · Issue #1412 · openapi-generators/openapi-python-client

The deprecated field from OpenAPI operations is parsed but not exposed to templates #1412

New issue
Copy link
New issue
Copy link
Open
#1413
Open
The deprecated field from OpenAPI operations is parsed but not exposed to templates#1412
#1413
Copy link

Description

@nimeshnayaju
nimeshnayaju
opened on Mar 11, 2026
Issue body actions

Describe the bug

The deprecated field on OpenAPI operation objects is parsed into the Operation schema model (operation.py#L31), but it is never carried over to the Endpoint dataclass that is passed to Jinja templates (openapi.py#L132-L152).

This means there is no way to check endpoint.deprecated in a custom template to conditionally emit deprecation warnings, docstring annotations, or @deprecated decorators.

The Endpoint dataclass is missing a deprecated: bool field, and the constructor at openapi.py#L419-L427 does not pass data.deprecated through.

Expected behavior

The Endpoint dataclass should include a deprecated: bool = False field, populated from data.deprecated during construction, so that templates can use {% if endpoint.deprecated %} to customize output for deprecated operations.

OpenAPI Spec File

Any spec with a deprecated operation, for example:

paths:
  /example:
    get:
      operationId: getExample
      deprecated: true
      responses:
        '200':
          description: OK

Desktop (please complete the following information):

  • OS: macOS 26.3
  • Python Version: 3.9.6
  • openapi-python-client version: 0.28.2

Activity

  1. nimeshnayaju commented on Mar 11, 2026

    @nimeshnayaju
    nimeshnayaju
    on Mar 11, 2026
    Author
    More actions

    Created a PR to address this: #1413

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402520 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.