Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Schema with only allOf properties is not added to definitions #255

Closed
1 of 2 tasks
QrystaL opened this issue Jan 14, 2025 · 1 comment
Closed
1 of 2 tasks

Schema with only allOf properties is not added to definitions #255

QrystaL opened this issue Jan 14, 2025 · 1 comment

Comments

@QrystaL
Copy link
Contributor

QrystaL commented Jan 14, 2025

Description

If a schema contains only composite properties from allOf section, it is ignored.

Repro steps

Use OpenApiClientProvider with the following yaml:

openapi: 3.0.0
paths:
  /run:
    summary: Do nothing.
components:
  schemas:
    Person:
      title: Person
      allOf:
      - type: object
        properties:
          first_name:
            type: string
            description: "First Name"

Expected behavior

Person type is generated.

Actual behavior

Person type is missing.

Known workarounds

None.

Affected Type Providers

  • SwaggerClientProvider
  • OpenApiClientProvider

Related information

  • Windows 11 23H2
  • 2.2.0
  • .NET 8
QrystaL added a commit to QrystaL/SwaggerProvider that referenced this issue Jan 14, 2025
sergey-tihon pushed a commit that referenced this issue Jan 16, 2025
* Added allOf properties to the schema definition (#255)

* Better PM

* Fixed formatting
@sergey-tihon
Copy link
Member

Fixed in v2.2.1. Thank you @QrystaL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants