Skip to content

Commit 6c2c386

Browse files
committed
docs: add documentation on how to define contacts
1 parent ddd0687 commit 6c2c386

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -483,6 +483,10 @@ openapi3 {
483483
title = 'My API title'
484484
version = '1.0.1'
485485
format = 'yaml'
486+
contact = {
487+
name = 'John Doe'
488+
489+
}
486490
separatePublicApi = true
487491
outputFileNamePrefix = 'my-api-spec'
488492
oauth2SecuritySchemeDefinition = {

samples/restdocs-api-spec-sample/build.gradle

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
import com.epages.restdocs.apispec.gradle.RestdocsApiSpecPlugin
2+
import io.swagger.v3.oas.models.info.Contact
3+
14
buildscript {
25
ext {
36
springBootVersion = '2.1.9.RELEASE'
@@ -8,14 +11,14 @@ buildscript {
811
}
912
dependencies {
1013
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
11-
classpath("com.epages:restdocs-api-spec-gradle-plugin:0.9.5")
14+
classpath project(":restdocs-api-spec-gradle-plugin")
1215
}
1316
}
1417

1518
apply plugin: 'java'
1619
apply plugin: 'org.springframework.boot'
1720
apply plugin: 'io.spring.dependency-management'
18-
apply plugin: 'com.epages.restdocs-api-spec'
21+
apply plugin: RestdocsApiSpecPlugin
1922

2023
sourceCompatibility = 1.8
2124

@@ -59,6 +62,10 @@ openapi3 {
5962
title = 'My API'
6063
description = 'An ecommerce sample demonstrating restdocs-api-spec'
6164
version = '0.1.0'
65+
contact = {
66+
name = 'John Doe'
67+
68+
}
6269
format = 'yaml'
6370
tagDescriptionsPropertiesFile = "src/test/resources/tags.yaml"
6471
}

0 commit comments

Comments
 (0)