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

Working on the simple aspire cosmos access feature. #205

Merged
merged 7 commits into from
Jan 10, 2024

Conversation

tomohisa
Copy link
Contributor

@tomohisa tomohisa commented Jan 6, 2024

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update

Description

Working on the simple aspire cosmos access feature.

Related Tickets & Documents

Added/updated tests?

We encourage you to keep the code coverage percentage at 80% and above.

  • Yes
  • No, and this is why: current test covers test cases.
  • I need help with writing tests
// usage sample
using FeatureCheck.Domain.Shared;
using FeatureCheck.WebApi.AspireTest;
using Sekiban.Core.Dependency;
using Sekiban.Infrastructure.Cosmos;
using Sekiban.Infrastructure.Cosmos.Aspire;
using Sekiban.Web.Dependency;
using Sekiban.Web.OpenApi.Extensions;
var builder = WebApplication.CreateBuilder(args);

// Sekiban Core Setting
builder.AddSekibanWithDependency(new FeatureCheckDependency());

// Sekiban Cosmos Setting
builder.AddSekibanCosmosDB()
.AddSekibanCosmosAspire("AspireCosmos"); 
// with this, sekiban will be connected to Cosmos DB with "ConnectionStrings:AspireCosmos"
// without this, Sekiban's default connection string to Cosmos DB is "ConnectionStrings:SekibanCosmos"

// Sekiban Web Setting
builder.Services.AddSekibanWeb<FeatureCheckWebAspireDependency>().AddSwaggerGen(options => options.ConfigureForSekiban());

// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
builder.Services.AddEndpointsApiExplorer();

var app = builder.Build();

// Configure the HTTP request pipeline.
if (app.Environment.IsDevelopment())
{
    app.UseSwagger();
    app.UseSwaggerUI();
}

app.MapControllers();
app.Run();

@tomohisa tomohisa linked an issue Jan 6, 2024 that may be closed by this pull request
@tomohisa tomohisa requested a review from tkawae January 6, 2024 09:07
@tomohisa tomohisa marked this pull request as ready for review January 10, 2024 22:26
Copy link

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@tomohisa tomohisa merged commit 6c24688 into main Jan 10, 2024
8 checks passed
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.

Simple Aspire feature.
1 participant