-
-
Notifications
You must be signed in to change notification settings - Fork 468
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3593af0
commit 3c19d44
Showing
7 changed files
with
208 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
...doc-openapi-data-rest-tests/src/test/java/test/org/springdoc/api/app35/ChildProperty.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package test.org.springdoc.api.app35; | ||
|
||
|
||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.GeneratedValue; | ||
import jakarta.persistence.GenerationType; | ||
import jakarta.persistence.Id; | ||
import lombok.Data; | ||
|
||
@Entity | ||
public @Data | ||
class ChildProperty { | ||
|
||
@Id | ||
@GeneratedValue(strategy = GenerationType.AUTO) | ||
private long id; | ||
|
||
private String name; | ||
|
||
public long getId() { | ||
return id; | ||
} | ||
|
||
public void setId(long id) { | ||
this.id = id; | ||
} | ||
|
||
public String getName() { | ||
return name; | ||
} | ||
|
||
public void setName(String name) { | ||
this.name = name; | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
...i-data-rest-tests/src/test/java/test/org/springdoc/api/app35/ChildPropertyRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package test.org.springdoc.api.app35; | ||
|
||
import io.swagger.v3.oas.annotations.Hidden; | ||
|
||
import org.springframework.data.repository.PagingAndSortingRepository; | ||
|
||
@Hidden | ||
public interface ChildPropertyRepository extends PagingAndSortingRepository<ChildProperty, Long> { | ||
} |
50 changes: 50 additions & 0 deletions
50
...pringdoc-openapi-data-rest-tests/src/test/java/test/org/springdoc/api/app35/Property.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
package test.org.springdoc.api.app35; | ||
|
||
|
||
|
||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.GeneratedValue; | ||
import jakarta.persistence.GenerationType; | ||
import jakarta.persistence.Id; | ||
import jakarta.persistence.JoinColumn; | ||
import jakarta.persistence.ManyToOne; | ||
import lombok.Data; | ||
|
||
@Entity | ||
public @Data | ||
class Property { | ||
|
||
@Id | ||
@GeneratedValue(strategy = GenerationType.AUTO) | ||
private long id; | ||
|
||
private String name; | ||
|
||
@ManyToOne | ||
@JoinColumn(name = "child_property_id") | ||
private ChildProperty myChildPropertyName; | ||
|
||
public long getId() { | ||
return id; | ||
} | ||
|
||
public void setId(long id) { | ||
this.id = id; | ||
} | ||
|
||
public String getName() { | ||
return name; | ||
} | ||
|
||
public void setName(String name) { | ||
this.name = name; | ||
} | ||
|
||
public ChildProperty getMyChildPropertyName() { | ||
return myChildPropertyName; | ||
} | ||
|
||
public void setMyChildPropertyName(ChildProperty myChildPropertyName) { | ||
this.myChildPropertyName = myChildPropertyName; | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
...penapi-data-rest-tests/src/test/java/test/org/springdoc/api/app35/PropertyRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package test.org.springdoc.api.app35; | ||
|
||
import io.swagger.v3.oas.annotations.Hidden; | ||
|
||
import org.springframework.data.repository.PagingAndSortingRepository; | ||
|
||
@Hidden | ||
public interface PropertyRepository extends PagingAndSortingRepository<Property, Long> { | ||
} |
33 changes: 33 additions & 0 deletions
33
...penapi-data-rest-tests/src/test/java/test/org/springdoc/api/app35/SpringDocApp35Test.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* | ||
* * | ||
* * * | ||
* * * * Copyright 2019-2020 the original author or authors. | ||
* * * * | ||
* * * * Licensed under the Apache License, Version 2.0 (the "License"); | ||
* * * * you may not use this file except in compliance with the License. | ||
* * * * You may obtain a copy of the License at | ||
* * * * | ||
* * * * https://www.apache.org/licenses/LICENSE-2.0 | ||
* * * * | ||
* * * * Unless required by applicable law or agreed to in writing, software | ||
* * * * distributed under the License is distributed on an "AS IS" BASIS, | ||
* * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* * * * See the License for the specific language governing permissions and | ||
* * * * limitations under the License. | ||
* * * | ||
* * | ||
* | ||
*/ | ||
|
||
package test.org.springdoc.api.app35; | ||
|
||
import test.org.springdoc.api.AbstractSpringDocTest; | ||
|
||
import org.springframework.boot.autoconfigure.SpringBootApplication; | ||
|
||
public class SpringDocApp35Test extends AbstractSpringDocTest { | ||
|
||
@SpringBootApplication | ||
static class SpringDocTestApp {} | ||
} |
17 changes: 17 additions & 0 deletions
17
...doc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/resources/results/app35.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"openapi": "3.0.1", | ||
"info": { | ||
"title": "OpenAPI definition", | ||
"version": "v0" | ||
}, | ||
"servers": [ | ||
{ | ||
"url": "http://localhost", | ||
"description": "Generated server url" | ||
} | ||
], | ||
"paths": {}, | ||
"components": { | ||
"schemas": {} | ||
} | ||
} |