Questions tagged [microprofile]

The Eclipse MicroProfile project defines a programming model for developing microservice applications in an Enterprise Java environment.

The Eclipse MicroProfile project is a CDI-first approach to building microservice applications and supported by both community and Java application server vendors. There are a number of active projects within MicroProfile, which can be viewed at the official website.

296 questions
4
votes
2 answers

How to use configuration maps for custom Quarkus ConfigProperties

For my Quarkus application I'm looking for a way to define a configuration map from within a custom ConfigProperties class. I tried the following: import io.quarkus.arc.config.ConfigProperties; import…
mika
  • 2,495
  • 22
  • 30
4
votes
1 answer

Quarkus Rest Client and OAuth2

I have a secured micro service that is calling another secured micro service. Both services have service accounts in Keycloak. How can I configure the 1st service to automatically obtain access token from keycloak when calling the 2nd service? It's…
overthetop
  • 1,664
  • 2
  • 15
  • 25
4
votes
1 answer

Quarkus / microprofile read pom.xml property

What i need to do is retrieve project version from pom.xml from java code. I'm currently use the snippet as the official documentation suggests: @ConfigProperty(name = "version") public String version; application.properties…
tzou85
  • 43
  • 4
4
votes
3 answers

How can I get the version of the application (defined by tag version in pom.xml) in quarkus specially?

I moved from a plain Java EE application to quarkus.io. In Java EE I had the a properties file with version=${project.version} and reeading this file in an JAX RS endpoint. This worked very well. @GET public Response getVersion() throws…
alexander
  • 1,191
  • 2
  • 20
  • 40
4
votes
2 answers

How to add HTTP headers in Microprofile REST client dynamically?

I am developing application, which uses microprofile rest client. And that rest client should send REST request with various http header. Some headers names changes dynamically. My microprofile rest client should be generic, but I did not find how…
madafaka
  • 133
  • 2
  • 7
4
votes
1 answer

How to configure OAuth authorization URL

I have a JAX-RS app using MP-OpenApi to provide an OpenAPI UI using OpenLiberty. My API is authenticated using OAuth2 implicit flow. This is currently configured using annotations, like this: @SecurityScheme( securitySchemeName =…
fabspro
  • 1,639
  • 19
  • 29
3
votes
1 answer

Helidon HttpServletRequest headers

I need to get HTTP Headers in my Helidon MP project. How can I get HttpServletRequest object to extract the headers from there? I have tried to look at the API but I have not found Servlet at all!
3
votes
0 answers

Annotate API that returns a HashMap in Java using OpenAPI-microprofile

I am struggling with my API-spec for my API that returns a HashMap. THe API itself works exactly as I want it to, but I want the OpenAPI to correctly specify the return type. I have been googling and found the SchemaType.ARRAY, which…
3
votes
2 answers

How to specify server url and description in OpenAPI when using Quarkus?

I am trying to get the following output in my /openApi URL of my Quarkus Rest service. servers: - url: 'https://serviceproxy.sun.ac.za/sunstudent-api' description: The production environment base - url:…
3
votes
1 answer

MicroProfile Metrics do not show custom metrics on Wildfly 25

I am experimenting with Javax/JaxRs and I am using the WildFly 25 server, which I am not quite familiar with. Searching for something similar to Spring's Actuator, I stumbled across the metrics & health endpoints the server exposes by default, and…
3
votes
2 answers

Unable to map / fetch the response entity on 422 error code in Microprofile Rest Client

I have an API, when I call it through postman it gives the below response on the following cases: Case1: status code: 200 {"success": "student record is present", "error": null} Case2: status code: 422 {"success": null, "error": "studentname…
3
votes
0 answers

Is it possible that the RestAPI can accept a Request from a specific file?

I would like to create an API to accept only the specific requests from the specific HTML I had provided. Following is an example; My idea is to add a ssh-key to the Header. The problem would be that if the key is released and other request uses…
miy
  • 43
  • 2
3
votes
0 answers

Open API v 3.0 Java Annotations Still being called .io.swagger

I am only getting started with openapi/swagger. I understand that Swagger APIs have been Open Sources and that they are now called OpenAPI. I also understand that in the new specs all references to swagger has been replaced with openapi. ( Eg:-…
Sony Antony
  • 314
  • 1
  • 11
3
votes
2 answers

How to configure rest client in quarkus microprofile case

When using Quarkus microprofile as a rest client, how can I configure underlying HttpClient? Like number of retries, connection pool size per host and so on? Also is it possible to force client restart somehow (so connections pool will be…
3
votes
1 answer

How to test Quarkus REST client interface?

I am using the MicroProfile REST client in Quarkus and would like to know how I can unit test custom client interfaces? Example service: @Path("/v1") @RegisterRestClient public interface CustomService { @POST @Path("/custom") void…
1
2
3
19 20