diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..293ac62 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,7 @@ +Copyright 2024 Caterina Simona Pastore + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Program.cs b/Program.cs index e99ea7b..685bf5e 100644 --- a/Program.cs +++ b/Program.cs @@ -51,8 +51,6 @@ internal class Program }); }); - // Register IConfiguration in the service container - var app = builder.Build(); @@ -67,11 +65,13 @@ internal class Program if (app.Environment.IsDevelopment()) { + app.UseStaticFiles(); app.UseSwagger(); app.UseSwaggerUI(options => { + options.InjectStylesheet("/swagger-ui/custom.css"); options.SwaggerEndpoint("/swagger/v1/swagger.json", "v1"); - options.RoutePrefix = string.Empty; + // options.RoutePrefix = string.Empty; }); } diff --git a/wwwroot/swagger-ui/custom.css b/wwwroot/swagger-ui/custom.css new file mode 100644 index 0000000..446b157 --- /dev/null +++ b/wwwroot/swagger-ui/custom.css @@ -0,0 +1,20 @@ +.topbar-wrapper img[alt="Swagger UI"], .topbar-wrapper span { + src +} + +.topbar-wrapper .link:after { + content: 'Unoffical McLaren F1 API'; + /* color: #fff; */ + visibility: visible; + display: block; + position: absolute; + padding: 15px; +} + +.swagger-ui .topbar .download-url-wrapper .select-label select { + border-color: #1cd6ef; +} + +.swagger-ui .info .title small:last-child { + background-color: #1cd6ef !important; +} diff --git a/wwwroot/swagger/favicon-16x16.png b/wwwroot/swagger/favicon-16x16.png new file mode 100644 index 0000000..0c5a7e6 Binary files /dev/null and b/wwwroot/swagger/favicon-16x16.png differ diff --git a/wwwroot/swagger/favicon-32x32.png b/wwwroot/swagger/favicon-32x32.png new file mode 100644 index 0000000..34e9c86 Binary files /dev/null and b/wwwroot/swagger/favicon-32x32.png differ diff --git a/wwwroot/swagger/favicon.ico b/wwwroot/swagger/favicon.ico new file mode 100644 index 0000000..478c817 Binary files /dev/null and b/wwwroot/swagger/favicon.ico differ