How to define the schema and the running port of the API?
See original GitHub issueQ&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:
- Created 5 years ago
- Comments:6 (3 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@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
andschemes
values in your Swagger document, and then Swagger-UI will read those values.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!