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

Enhance support for $ref in requestBody of endpoint #4747

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Eruzo
Copy link

@Eruzo Eruzo commented Jan 31, 2024

This pull request enhances support for the $ref keyword in request bodies. Given the following oas endpoint:

/end-point-uri:
    post:
      tags:
        - SomeTag
      summary: Search for something with a request body
      description: |
       Search something with a request body that is defined as a reference
      operationId: PostSearchSomething
      parameters:
        - $ref: '#/components/parameters/CorrelationId'
        - $ref: '#/components/parameters/ReferenceDate'
      requestBody:
        $ref: '#/components/requestBodies/PostSearchSomethingRequest'

The generator would generate the following function PostSearchSomethingRequestAsync(object body) with the supplied change it will generate PostSearchSomethingRequestAsync(PostSearchSomethingRequest body).

Fixes #4093 as well I think

@Eruzo Eruzo changed the title Allow $ref in requestBody of endpoint Add support for $ref in requestBody of endpoint Jan 31, 2024
@Eruzo Eruzo force-pushed the allow-ref-on-request-bodies branch from e51fca0 to 76c9d50 Compare January 31, 2024 14:18
@Eruzo Eruzo force-pushed the allow-ref-on-request-bodies branch from 76c9d50 to b9a77e8 Compare July 29, 2024 07:55
@Eruzo Eruzo force-pushed the allow-ref-on-request-bodies branch from b5cd750 to 9211c03 Compare July 29, 2024 08:06
@Eruzo Eruzo changed the title Add support for $ref in requestBody of endpoint Enhance support for $ref in requestBody of endpoint Jul 29, 2024
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

Successfully merging this pull request may close these issues.

Request body is mapped to object instead of DTO type
1 participant