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

fix path parameters in parent #7

Merged
merged 1 commit into from
Mar 16, 2023

Conversation

kgamecarter
Copy link
Contributor

Example YAML:

swagger: '2.0'
info:
  title: Reference parameters
  version: v0.0.1
paths:
  '/orders/{orderId}/order-items/{orderItemId}':
    parameters:
      - $ref: '#/parameters/OrderId'
      - $ref: '#/parameters/OrderItemId'
    delete:
      summary: Delete an order item
      description: >-
        This method allows to remove an order item from an order, by specifying
        their ids.
      responses:
        "204":
          description: No Content.
        default:
          description: Default response
          schema:
            $ref: '#/definitions/Error'
definitions:
  Error:
    type: object
    properties:
      message:
          type: string
parameters:
  OrderId:
    name: orderId
    in: path
    description: Identifier of the order.
    required: true
    type: string
    format: uuid
  OrderItemId:
    name: orderItemId
    in: path
    description: Identifier of the order item.
    required: true
    type: string
    format: uuid

Generated code:

public interface IReferenceparameters
{
	/// <summary>
	/// This method allows to remove an order item from an order, by specifying their ids.
	/// </summary>
	[Delete("/orders/{orderId}/order-items/{orderItemId}")]
	Task OrderItems();
}

missing orderId and orderItemId path parameters

@christianhelle christianhelle self-assigned this Mar 16, 2023
@christianhelle christianhelle added the bug Something isn't working label Mar 16, 2023
Copy link
Owner

@christianhelle christianhelle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@christianhelle
Copy link
Owner

@kgamecarter Thanks for this contribution.

I'll merge this in as soon as all the checks for this pull request succeed, then I'll run some regression tests and push this off to nuget.org

@christianhelle
Copy link
Owner

This resolves #8

@christianhelle christianhelle merged commit bad0189 into christianhelle:main Mar 16, 2023
@christianhelle
Copy link
Owner

@kgamecarter your contribution is now released to nuget.org

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants