Skip to content

Custom Fields in Document #768

Description

@FrankEssenberger

Dear open-api types team,

I was doing an update to version 9 recently and got a few type errors which where easy to fix. However, we have a wrapper for the openApi generator which adds some custom properties to the document e.g. x-my-additional-property which can be on the root, path or operation.

I saw that for the operation the type goes down from the document so I could put an object containing the custom fields. However, for the PathItemObject I can not set the value for

on the Document which exposes only .

I was wondering if these genric arguments are supposed to be used to put custom properties? If so it should be possible to set them all on the root object i.e. Document. I also think it would be nice to either have a single generic parameter holding all additional properties combined, or one for each location?

This is not a critical issue with Omit<> I could adjust the types as I needed but it would be nice if this works out of the box. I wanted to discuss the solution before I open a PR.

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