buildscript {
	ext {
		springBootVersion = '3.0.0'
	}
	repositories {
		mavenCentral()
		maven { url "https://plugins.gradle.org/m2/" }
	}
	dependencies {
		classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
		classpath("com.epages:restdocs-api-spec-gradle-plugin:0.19.2")
	}
}

apply plugin: 'java'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'com.epages.restdocs-api-spec'

repositories {
	mavenCentral()
}

sourceCompatibility = 17
targetCompatibility = 17

ext {
	snippetsDir = file('build/generated-snippets')
}

dependencies {
	implementation('org.springframework.boot:spring-boot-starter-webflux')

	testImplementation('org.junit.jupiter:junit-jupiter-engine')
	testImplementation('org.springframework.boot:spring-boot-starter-test')
	testImplementation('org.springframework.restdocs:spring-restdocs-webtestclient')
	testImplementation('io.projectreactor:reactor-test')

	testImplementation project(':restdocs-api-spec-mockmvc')
}

openapi {
	host = 'localhost:8080'
	basePath = '/api'
	title = 'My API'
	description = 'An ecommerce sample demonstrating restdocs-api-spec'
	version = '0.1.0'
	format = 'yaml'
}

openapi3 {
	server = 'https://localhost:8080'
	title = 'My API'
	description = 'An ecommerce sample demonstrating restdocs-api-spec'
	version = '0.1.0'
	format = 'yaml'
}

postman {
	title = 'My API'
	version = '0.1.0'
	baseUrl = 'https://localhost:8080'
}
