Skip to content

Commit eff2402

Browse files
committed
Add info.contact to openapi
1 parent ac85a69 commit eff2402

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

spotify-web-api-generator-open-api/spotify-web-api-openapi.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
openapi: 3.0.1
22
info:
33
title: Spotify Web API
4+
contact:
5+
url: https://github.com/sonallux/spotify-web-api
46
version: 2021.4.2
57
externalDocs:
68
description: Find more info on the official Spotify Web API Reference

spotify-web-api-generator-open-api/src/main/java/de/sonallux/spotify/generator/openapi/OpenApiGenerator.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import de.sonallux.spotify.core.SpotifyWebApiUtils;
55
import de.sonallux.spotify.core.model.*;
66
import io.swagger.v3.oas.models.*;
7+
import io.swagger.v3.oas.models.info.Contact;
78
import io.swagger.v3.oas.models.info.Info;
89
import io.swagger.v3.oas.models.media.*;
910
import io.swagger.v3.oas.models.parameters.RequestBody;
@@ -38,13 +39,13 @@ public OpenApiGenerator() {
3839
public OpenAPI generate(SpotifyWebApi apiDocumentation) {
3940
this.openAPI = new OpenAPI();
4041
this.openAPI
41-
.externalDocs(new ExternalDocumentation()
42-
.url(apiDocumentation.getApiDocumentationUrl())
43-
.description("Find more info on the official Spotify Web API Reference")
44-
)
42+
.externalDocs(generateExternalDocumentation(apiDocumentation.getApiDocumentationUrl()))
4543
.info(new Info()
4644
.title("Spotify Web API")
4745
.version(VersionProvider.getVersion())
46+
.contact(new Contact()
47+
.url("https://github.com/sonallux/spotify-web-api")
48+
)
4849
)
4950
.servers(List.of(new Server().url(apiDocumentation.getEndpointUrl())))
5051
.components(new Components()

0 commit comments

Comments
 (0)