question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to define the schema and the running port of the API?

See original GitHub issue

Q&A (please complete the following information)

  • OS: [macOS]
  • Browser: [chrome, safari]
  • Method of installation: [dotnet CLI]
  • Swagger-UI version: [ASP.NET CORE 2.4.0]
  • Swagger/OpenAPI version: [Swagger 2.0, OpenAPI 3.0]

Content & configuration

public void ConfigureServices (IServiceCollection services) {
services.AddSwaggerGen (c => { c.SwaggerDoc ("v1", new Info { Title = "ArtNgCore APIs", Version = "v1" }); });
}

 public void Configure ( IApplicationBuilder app) {
 app.UseSwagger ();
 app.UseSwaggerUI (c => {
                c.SwaggerEndpoint ("/swagger/v1/swagger.json", "ArtNgCore APIs V1");
            });
}

How can we help?

How is it possible to configure the schema and the port of the API? The default is HTTP, port 5000. My app runs SSL. Https and port 5001?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
shockeycommented, May 15, 2018

@embryologist I see, apologies for getting it wrong 😄

You don’t provide scheme and host information to Swagger-UI directly - you need to set the host and schemes values in your Swagger document, and then Swagger-UI will read those values.

0reactions
lock[bot]commented, Jul 2, 2019

Locking due to inactivity.

This is done to avoid resurrecting old issues and bumping long threads with new, possibly unrelated content.

If you think you’re experiencing something similar to what you’ve found here: please open a new issue, follow the template, and reference this issue in your report.

Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

API Schema commands - IBM
API Schema commands ; wsdl-port, This command specifies the QName of the WSDL port that defines the service traffic to validate. ; wsdl-schema-url,...
Read more >
Schema Registry API Usage Examples
Start ZooKeeper. Run this command in its own terminal. bin/zookeeper-server-start ./etc/kafka/zookeeper. · Start Kafka. Run this command in its own terminal. bin ...
Read more >
API Reference: ApolloServer - Apollo GraphQL Docs
A valid Schema Definition Language (SDL) string, document, or documents that represent your server's GraphQL schema. To generate documents, you can apply ...
Read more >
How To Use Joi for Node API Schema Validation - DigitalOcean
Then navigate to that directory: cd joi-schema-validation. Copy. Run the following command to set up a new project: npm init -y.
Read more >
Minimal APIs quick reference - Microsoft Learn
Run ($"http://localhost:{port}");. The preferred way to set the port from the environment is to use the ASPNETCORE_URLS environment variable, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found