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

Issues with OpenAPI Component Properties, Server Endpoints, and Path Filtering #1419

Closed
mdaneri opened this issue Oct 15, 2024 · 0 comments · Fixed by #1420
Closed

Issues with OpenAPI Component Properties, Server Endpoints, and Path Filtering #1419

mdaneri opened this issue Oct 15, 2024 · 0 comments · Fixed by #1420
Labels
Milestone

Comments

@mdaneri
Copy link
Contributor

mdaneri commented Oct 15, 2024

Description:

The following issues were encountered in Pode:

  1. New-PodeOAComponentSchemaProperty:

    • This function does not currently accept the following properties: $Example, $Deprecated, $Required, $Nullable, $ReadOnly, and $WriteOnly.
    • Expected Behavior: The function should support these properties to ensure complete OpenAPI schema descriptions.
  2. Add-PodeOAServerEndpoint:

    • This function mistakenly accepts multiple local endpoints.
    • Expected Behavior: Only one local endpoint should be allowed for a single server definition.
  3. OpenAPI Path Filtering:

    • OpenAPI path definitions that are outside the server endpoint URL should be excluded from the OpenAPI description.
    • Example:
      • Server Endpoint URL: /api/v3
      • Path 1: /api/v2/test
      • Path 2: /api/v3/test
    • Only paths that match the server endpoint (like path2) should be included in the OpenAPI description.

Steps to Reproduce:

  1. Call New-PodeOAComponentSchemaProperty with the properties mentioned above and observe that they are not accepted.
  2. Define multiple local endpoints using Add-PodeOAServerEndpoint and observe that more than one local endpoint is allowed.
  3. Define paths with different API versions and note that paths outside the Server Endpoint URL are included in the OpenAPI description.

Expected Behavior:

  • Support for missing properties in New-PodeOAComponentSchemaProperty.
  • Restrict Add-PodeOAServerEndpoint to accept only one local endpoint.
  • Exclude paths outside the Server Endpoint URL from the OpenAPI description.
@mdaneri mdaneri changed the title OpenApi Issues with OpenAPI Component Properties, Server Endpoints, and Path Filtering Oct 15, 2024
@Badgerati Badgerati added this to the 2.11.1 milestone Oct 21, 2024
@github-project-automation github-project-automation bot moved this from Backlog to Done in 🚀 Pode Roadmap Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants