Skip to content

[Nitro CLI] Add OpenAPI commands#8969

Merged
tobias-tengler merged 28 commits intomainfrom
tte/nitro-cli-openapi
Jan 30, 2026
Merged

[Nitro CLI] Add OpenAPI commands#8969
tobias-tengler merged 28 commits intomainfrom
tte/nitro-cli-openapi

Conversation

@tobias-tengler
Copy link
Copy Markdown
Member

@tobias-tengler tobias-tengler commented Dec 4, 2025

No description provided.

@tobias-tengler tobias-tengler force-pushed the tte/nitro-cli-openapi branch 3 times, most recently from 865a104 to 63cae91 Compare December 8, 2025 10:39
@tobias-tengler tobias-tengler force-pushed the tte/nitro-cli-openapi branch 3 times, most recently from 0214d69 to 6ed9b10 Compare December 11, 2025 11:15
@tobias-tengler tobias-tengler marked this pull request as ready for review January 30, 2026 16:11
Copilot AI review requested due to automatic review settings January 30, 2026 16:11
@tobias-tengler tobias-tengler merged commit 1518ed3 into main Jan 30, 2026
120 of 121 checks passed
@tobias-tengler tobias-tengler deleted the tte/nitro-cli-openapi branch January 30, 2026 16:19
@codecov
Copy link
Copy Markdown

codecov bot commented Jan 30, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.00%. Comparing base (5f75b05) to head (7c18558).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@     Coverage Diff      @@
##   main   #8969   +/-   ##
============================
============================

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request adds comprehensive OpenAPI collection management functionality to the Nitro CLI tool. It introduces a new openapi command with subcommands for creating, deleting, listing, uploading, publishing, and validating OpenAPI collections.

Changes:

  • Added six new OpenAPI collection management commands (create, delete, list, upload, publish, validate) with corresponding GraphQL queries and mutations
  • Extended GraphQL schema with OpenAPI collection types, interfaces, and operations
  • Implemented glob pattern matching for selecting multiple OpenAPI document files
  • Fixed a typo in ListClientCommand changing "For which client" to "For which API"

Reviewed changes

Copilot reviewed 32 out of 34 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
schema.graphql Added comprehensive OpenAPI collection types, interfaces, mutations, subscriptions, and error types to the GraphQL schema
operations.json Updated persisted operations with new OpenAPI-related GraphQL queries, mutations, and subscriptions
fragments.graphql Added OpenAPI collection validation fragments and fixed duplicate PersistedQueryValidationError fragment reference
ThrowHelper.cs Added NoOpenApiCollectionSelected() helper method
ConsoleHelpers.cs Added error printing methods for OpenAPI collection validation errors and archive errors
GlobMatcher.cs New utility class for matching files using glob patterns, supporting both absolute and relative paths
OpenApiCollectionHelpers.cs Helper class for building OpenAPI collection archives from document files
Create/Delete/List/Upload/Publish/ValidateOpenApiCollectionCommand.cs Six new command implementations for managing OpenAPI collections
OpenApiCollectionIdOption.cs, OpenApiCollectionNameOption.cs, OpenApiCollectionFilePatternOption.cs Command-line options for OpenAPI collection operations
SelectOpenApiCollectionPrompt.cs, OpenApiCollectionDetailPrompt.cs UI components for selecting and displaying OpenAPI collections
OpenApiCommand.cs Main command that aggregates all OpenAPI subcommands
NitroCloudCommandExtensions.cs Registered the new OpenApiCommand
JsonSourceGenerationContext.cs Added JSON serialization support for OpenAPI collection results
Nitro.CommandLine.csproj Added project references to OpenAPI adapter packages
Directory.Packages.props Added Microsoft.Extensions.FileSystemGlobbing package dependency
README.md Added documentation for updating the schema.graphql file
ListClientCommand.cs Fixed typo in user prompt message

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

"The server received an invalid archive. "
+ "This indicates a bug in the tooling. "
+ "Please notify ChilliCream."
+ "Error received: " + message);
Copy link

Copilot AI Jan 30, 2026

Choose a reason for hiding this comment

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

Missing space after the period. The error message should read "Please notify ChilliCream. Error received:" with a space before "Error received:".

Suggested change
+ "Error received: " + message);
+ " Error received: " + message);

Copilot uses AI. Check for mistakes.
{
public PublishOpenApiCollectionCommand() : base("publish")
{
Description = "Publish an OpenAPI collection version to an stage";
Copy link

Copilot AI Jan 30, 2026

Choose a reason for hiding this comment

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

Grammar error: "to an stage" should be "to a stage". The article "an" is used before vowel sounds, but "stage" begins with a consonant sound.

Suggested change
Description = "Publish an OpenAPI collection version to an stage";
Description = "Publish an OpenAPI collection version to a stage";

Copilot uses AI. Check for mistakes.
Comment on lines +29 to +30

private static async Task<int> ExecuteAsync(
Copy link

Copilot AI Jan 30, 2026

Choose a reason for hiding this comment

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

Incorrect indentation: this method declaration is missing one space. It should have 4 spaces of indentation like other methods in the file, but it only has 3 spaces.

Suggested change
private static async Task<int> ExecuteAsync(
private static async Task<int> ExecuteAsync(

Copilot uses AI. Check for mistakes.

internal static class GlobMatcher
{
public static IEnumerable<string> Match(IEnumerable<string> patterns) {
Copy link

Copilot AI Jan 30, 2026

Choose a reason for hiding this comment

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

Missing whitespace between the closing parenthesis and opening brace. According to C# formatting conventions, there should be a space before the opening brace.

Suggested change
public static IEnumerable<string> Match(IEnumerable<string> patterns) {
public static IEnumerable<string> Match(IEnumerable<string> patterns) {

Copilot uses AI. Check for mistakes.
@github-actions
Copy link
Copy Markdown
Contributor

🚀 Fusion Gateway Performance Results

Simple Composite Query

Constant Load (50 VUs)

Requests/sec Error Rate
5779.20 req/s 0.00%
📊 Response Time Metrics
Min Med Max Avg P90 P95
0.77ms 7.19ms 163.66ms 8.50ms 13.27ms 18.77ms

Ramping Load (0→50→500→50 VUs)

Requests/sec Error Rate
4550.75 req/s 0.00%
📊 Response Time Metrics
Min Med Max Avg P90 P95
0.82ms 39.47ms 243.58ms 48.85ms 108.63ms 126.25ms

Executed Query

fragment User on User {
  id
  username
  name
}

fragment Review on Review {
  id
  body
}

fragment Product on Product {
  inStock
  name
  price
  shippingEstimate
  upc
  weight
}

query TestQuery {
  topProducts(first: 5) {
    ...Product
    reviews {
      ...Review
      author {
        ...User
      }
    }
  }
}

Deep Recursion Query

Constant Load (50 VUs)

Requests/sec Error Rate
271.21 req/s 0.00%
📊 Response Time Metrics
Min Med Max Avg P90 P95
12.53ms 172.82ms 717.35ms 178.74ms 226.15ms 253.12ms

Ramping Load (0→50→500→50 VUs)

Requests/sec Error Rate
303.88 req/s 0.00%
📊 Response Time Metrics
Min Med Max Avg P90 P95
3.06ms 689.66ms 1752.90ms 697.71ms 1350.18ms 1499.59ms

Executed Query

fragment User on User {
  id
  username
  name
}

fragment Review on Review {
  id
  body
}

fragment Product on Product {
  inStock
  name
  price
  shippingEstimate
  upc
  weight
}

query TestQuery {
  users {
    ...User
    reviews {
      ...Review
      product {
        ...Product
        reviews {
          ...Review
          author {
            ...User
            reviews {
              ...Review
              product {
                ...Product
              }
            }
          }
        }
      }
    }
  }
  topProducts(first: 5) {
    ...Product
    reviews {
      ...Review
      author {
        ...User
        reviews {
          ...Review
          product {
            ...Product
          }
        }
      }
    }
  }
}

Variable Batching Throughput

Constant Load (50 VUs)

Requests/sec Error Rate
23659.06 req/s 0.00%
📊 Response Time Metrics
Min Med Max Avg P90 P95
0.09ms 1.71ms 40.32ms 2.06ms 3.91ms 4.79ms

Ramping Load (0→50→500→50 VUs)

Requests/sec Error Rate
18590.27 req/s 0.00%
📊 Response Time Metrics
Min Med Max Avg P90 P95
0.10ms 9.35ms 107.75ms 11.37ms 23.37ms 28.23ms

Executed Query

query TestQuery_8f7a46ce_2(
  $__fusion_1_upc: ID!
  $__fusion_2_price: Long!
  $__fusion_2_weight: Long!
) {
  productByUpc(upc: $__fusion_1_upc) {
    inStock
    shippingEstimate(weight: $__fusion_2_weight, price: $__fusion_2_price)
  }
}

Variables (5 sets batched in single request)

[
  { "__fusion_1_upc": "1", "__fusion_2_price": 899, "__fusion_2_weight": 100 },
  { "__fusion_1_upc": "2", "__fusion_2_price": 1299, "__fusion_2_weight": 1000 },
  { "__fusion_1_upc": "3", "__fusion_2_price": 15, "__fusion_2_weight": 20 },
  { "__fusion_1_upc": "4", "__fusion_2_price": 499, "__fusion_2_weight": 100 },
  { "__fusion_1_upc": "5", "__fusion_2_price": 1299, "__fusion_2_weight": 1000 }
]

No baseline data available for comparison.


Run 21522385764 • Commit 2854e22 • Fri, 30 Jan 2026 16:30:06 GMT

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants