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

Missing path parameters in parent #8

Closed
christianhelle opened this issue Mar 16, 2023 · 1 comment
Closed

Missing path parameters in parent #8

christianhelle opened this issue Mar 16, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@christianhelle
Copy link
Owner

This was pointed out to me by @kgamecarter

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 added the bug Something isn't working label Mar 16, 2023
@christianhelle christianhelle self-assigned this Mar 16, 2023
@christianhelle
Copy link
Owner Author

christianhelle commented Mar 16, 2023

This should be fixed in this pull request by @kgamecarter

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

No branches or pull requests

1 participant