-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #38265 from bpasson/issue/38247
Fixes incorrect rel=self web link
- Loading branch information
Showing
19 changed files
with
636 additions
and
40 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
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
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
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
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
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
31 changes: 31 additions & 0 deletions
31
...steasy/reactive/links/deployment/RestLinksWithFailureInjectionMultipleRestLinkIdTest.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,31 @@ | ||
package io.quarkus.resteasy.reactive.links.deployment; | ||
|
||
import static org.assertj.core.api.Assertions.assertThat; | ||
import static org.junit.jupiter.api.Assertions.fail; | ||
|
||
import org.junit.jupiter.api.Test; | ||
import org.junit.jupiter.api.extension.RegisterExtension; | ||
|
||
import io.quarkus.runtime.util.ExceptionUtil; | ||
import io.quarkus.test.QuarkusUnitTest; | ||
|
||
public class RestLinksWithFailureInjectionMultipleRestLinkIdTest { | ||
|
||
@RegisterExtension | ||
static final QuarkusUnitTest TEST = new QuarkusUnitTest() | ||
.withApplicationRoot( | ||
jar -> jar.addClasses(TestRecordMultipleRestLinkIds.class, TestResourceMultipleRestLinkIds.class)) | ||
.assertException(t -> { | ||
Throwable rootCause = ExceptionUtil.getRootCause(t); | ||
assertThat(rootCause).isInstanceOf(IllegalStateException.class) | ||
.hasMessageContaining("Cannot generate web links for the class " + | ||
"io.quarkus.resteasy.reactive.links.deployment.TestRecordMultipleRestLinkIds" + | ||
" because it has multiple fields annotated with `@RestLinkId`, where a maximum of one is allowed"); | ||
}); | ||
|
||
@Test | ||
void validationFailed() { | ||
// Should not be reached: verify | ||
fail(); | ||
} | ||
} |
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
46 changes: 46 additions & 0 deletions
46
...est/java/io/quarkus/resteasy/reactive/links/deployment/TestRecordMultipleRestLinkIds.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,46 @@ | ||
package io.quarkus.resteasy.reactive.links.deployment; | ||
|
||
import io.quarkus.resteasy.reactive.links.RestLinkId; | ||
|
||
public class TestRecordMultipleRestLinkIds { | ||
|
||
@RestLinkId | ||
private long idOne; | ||
@RestLinkId | ||
private long idTwo; | ||
|
||
private String name; | ||
|
||
public TestRecordMultipleRestLinkIds() { | ||
} | ||
|
||
public TestRecordMultipleRestLinkIds(long idOne, long idTwo, String name) { | ||
this.idOne = idOne; | ||
this.idTwo = idTwo; | ||
this.name = name; | ||
} | ||
|
||
public long getIdOne() { | ||
return idOne; | ||
} | ||
|
||
public void setIdOne(long idOne) { | ||
this.idOne = idOne; | ||
} | ||
|
||
public long getIdTwo() { | ||
return idTwo; | ||
} | ||
|
||
public void setIdTwo(long idTwo) { | ||
this.idTwo = idTwo; | ||
} | ||
|
||
public String getName() { | ||
return name; | ||
} | ||
|
||
public void setName(String name) { | ||
this.name = name; | ||
} | ||
} |
44 changes: 44 additions & 0 deletions
44
.../java/io/quarkus/resteasy/reactive/links/deployment/TestRecordWithIdAndPersistenceId.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,44 @@ | ||
package io.quarkus.resteasy.reactive.links.deployment; | ||
|
||
import io.quarkus.resteasy.reactive.links.deployment.persistence.Id; | ||
|
||
public class TestRecordWithIdAndPersistenceId { | ||
|
||
@Id | ||
private int persistenceId; | ||
private int id; | ||
private String name; | ||
|
||
public TestRecordWithIdAndPersistenceId() { | ||
} | ||
|
||
public TestRecordWithIdAndPersistenceId(int persistenceId, int id, String value) { | ||
this.persistenceId = persistenceId; | ||
this.id = id; | ||
this.name = value; | ||
} | ||
|
||
public int getPersistenceId() { | ||
return persistenceId; | ||
} | ||
|
||
public void setPersistenceId(int persistenceId) { | ||
this.persistenceId = persistenceId; | ||
} | ||
|
||
public int getId() { | ||
return id; | ||
} | ||
|
||
public void setId(int id) { | ||
this.id = id; | ||
} | ||
|
||
public String getName() { | ||
return name; | ||
} | ||
|
||
public void setName(String name) { | ||
this.name = name; | ||
} | ||
} |
Oops, something went wrong.