Skip to content

Conversation

@peombwa
Copy link
Contributor

@peombwa peombwa commented Nov 13, 2023

This PR fixes #46 by making the following changes:

  • Adds an OpenApi to ApiManifest mapping doc that's implemented by the extension method.
  • Adds ToApiManifest extension method for OpenApiDocument. The method will be used dependent tools to convert and OpenAPI document to an ApiManifest.
  • Adds unit tests to validate the conversion.

Proposed Usage

// Convert an instance of OpenAPIDocument to an ApiManifest document.
var openApiDocument = new OpenApiStreamReader().Read(stream, out var diagnostic);
var apiManifest = openApiDocument.ToApiManifest("https://example.com/openApi.yaml", "MyApplicationName");
// or
var apiManifest = openApiDocument.ToApiManifest("https://example.com/openApi.yaml", "MyApplicationName", "GraphApi", "PubName", "[email protected]");

@peombwa peombwa marked this pull request as ready for review November 14, 2023 23:14
@peombwa peombwa self-assigned this Nov 14, 2023
@peombwa peombwa requested review from baywet and zengin November 15, 2023 23:45
zengin
zengin previously approved these changes Nov 16, 2023
Copy link

@zengin zengin left a comment

Choose a reason for hiding this comment

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

Thank you for applying suggested changes!

Copy link
Member

@baywet baywet left a comment

Choose a reason for hiding this comment

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

thanks for making the updates, a couple of things left.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

94.5% 94.5% Coverage
0.0% 0.0% Duplication

@peombwa peombwa requested a review from baywet November 16, 2023 19:09
@peombwa peombwa enabled auto-merge November 16, 2023 20:05
@peombwa peombwa merged commit 4ed92fb into main Nov 16, 2023
@peombwa peombwa deleted the po/AddsGenerationOfApiManifest branch November 16, 2023 20:17
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.

Add support for generation of ApiManifest from an OpenApi document instance

4 participants