Skip to content

Commit

Permalink
Add minimal test reproducing #10
Browse files Browse the repository at this point in the history
  • Loading branch information
neiser committed Jun 28, 2021
1 parent 2557cf4 commit 123a385
Show file tree
Hide file tree
Showing 4 changed files with 92 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package de.qaware.openapigeneratorforspring.test.app99;

import io.swagger.v3.oas.annotations.OpenAPIDefinition;
import io.swagger.v3.oas.annotations.info.Info;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
@OpenAPIDefinition(
info = @Info(title = "My own title")
)
public class App99 {
public static void main(String[] args) {
SpringApplication.run(App99.class, args);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package de.qaware.openapigeneratorforspring.test.app99;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.time.Instant;

@RestController
public class App99Controller {

@GetMapping("mapping1")
public Instant mapping1() {
return null;
}

@GetMapping("mapping2")
public Instant mapping2() {
return null;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package de.qaware.openapigeneratorforspring.test.app99;

import de.qaware.openapigeneratorforspring.test.AbstractOpenApiGeneratorWebMvcIntTest;

class App99Test extends AbstractOpenApiGeneratorWebMvcIntTest {

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"openapi": "3.0.1",
"info": {
"title": "My own title",
"version": "unknown"
},
"paths": {
"/mapping1": {
"get": {
"operationId": "mapping1",
"responses": {
"200": {
"$ref": "#/components/responses/200"
}
}
}
},
"/mapping2": {
"get": {
"operationId": "mapping2",
"responses": {
"200": {
"$ref": "#/components/responses/200"
}
}
}
}
},
"components": {
"responses": {
"200": {
"description": "Default response",
"content": {
"*/*": {
"schema": {
"$ref": "#/components/schemas/string_date-time"
}
}
}
}
},
"schemas": {
"string_date-time": {
"type": "string",
"format": "date-time"
}
}
}
}

0 comments on commit 123a385

Please sign in to comment.