@Produces(MediaType.APPLICATION_JSON)
String getNotifierType(@MatrixParam("notifierType") String notifierType)
throws CustomException;
< /code>
- Jaxrs нуждается в Matrixparam в заголовке метода. Именно так Jaxrs знает в примере/Get Endpoint. Есть дополнительная дополнительная; Notifiertype = x для заполнения MatrixParam.
- Swagger UI должен иметь путь, подобный этому примеру/get {notifiertype}. Таким образом, метод был бы таким: < /p>
@GET @Path("example/get{notifierType}")
@Produces(MediaType.APPLICATION_JSON)
String getNotifierType(@MatrixParam("notifierType") String notifierType)
throws CustomException;
curl -x 'get'
'https: // localhost: 8080/xyz/config/пример/self; notifiertype = email_local'
-h 'Accept: Application/json'
-h 'Accept: Application/json' Конечная точка ожидает следующего curl: < /p>
curl -x 'get'
'https: // localhost: 8080 /xyz /config /example /self {natifiertyp}; natifiertyp = emark_local'
Есть ли какое -либо решение в этом случае? Можно ли выполнять методы с помощью MatrixParams в Swagger UI в проекте на основе JAXRS? />
Это изображение соответствует этой операции:
@GET @Path("example/get")
@Produces(MediaType.APPLICATION_JSON)
String getNotifierType(@MatrixParam("notifierType") String notifierType)
throws CustomException;
Подробнее здесь: https://stackoverflow.com/questions/796 ... nnotations