Search in sources :

Example 1 with Context

use of io.javalin.http.Context in project emfcloud-modelserver by eclipse-emfcloud.

the class DefaultModelControllerTest method getAllXmiFormat.

@Test
public void getAllXmiFormat() throws EncodingException, IOException {
    final AtomicReference<JsonNode> response = new AtomicReference<>();
    final EClass brewingUnit = EcoreFactory.eINSTANCE.createEClass();
    Answer<Void> answer = invocation -> {
        response.set(invocation.getArgument(0));
        return null;
    };
    doAnswer(answer).when(context).json(any(JsonNode.class));
    final LinkedHashMap<String, List<String>> queryParams = new LinkedHashMap<>();
    queryParams.put(ModelServerPathParametersV1.FORMAT, Collections.singletonList(ModelServerPathParametersV1.FORMAT_XMI));
    when(context.queryParamMap()).thenReturn(queryParams);
    final Map<URI, EObject> allModels = Collections.singletonMap(URI.createURI("test"), brewingUnit);
    when(modelRepository.getAllModels()).thenReturn(allModels);
    modelController.getAll(context);
    assertThat(response.get().get(JsonResponseMember.DATA), is(equalTo(Json.object(Json.prop("test", new XmiCodec().encode(brewingUnit))))));
}
Also used : CoreMatchers.is(org.hamcrest.CoreMatchers.is) HttpURLConnection(java.net.HttpURLConnection) EcoreFactory(org.eclipse.emf.ecore.EcoreFactory) CoreMatchers(org.hamcrest.CoreMatchers) Arrays(java.util.Arrays) ArgumentMatchers.eq(org.mockito.ArgumentMatchers.eq) CCommandExecutionResult(org.eclipse.emfcloud.modelserver.command.CCommandExecutionResult) PatchCommandHandler(org.eclipse.emfcloud.modelserver.emf.patch.PatchCommandHandler) MockitoHamcrest.argThat(org.mockito.hamcrest.MockitoHamcrest.argThat) Context(io.javalin.http.Context) Mockito.doAnswer(org.mockito.Mockito.doAnswer) Map(java.util.Map) JsonPatchHelper(org.eclipse.emfcloud.modelserver.emf.util.JsonPatchHelper) JsonNode(com.fasterxml.jackson.databind.JsonNode) Json(org.eclipse.emfcloud.modelserver.jsonschema.Json) CCommandFactory(org.eclipse.emfcloud.modelserver.command.CCommandFactory) ServerConfiguration(org.eclipse.emfcloud.modelserver.emf.configuration.ServerConfiguration) JsonResource(org.eclipse.emfcloud.jackson.resource.JsonResource) EObject(org.eclipse.emf.ecore.EObject) Collectors(java.util.stream.Collectors) List(java.util.List) EcoreResourceFactoryImpl(org.eclipse.emf.ecore.xmi.impl.EcoreResourceFactoryImpl) Entry(java.util.Map.Entry) Resource(org.eclipse.emf.ecore.resource.Resource) Optional(java.util.Optional) Pattern(java.util.regex.Pattern) DecodingException(org.eclipse.emfcloud.modelserver.common.codecs.DecodingException) EMFCommandType(org.eclipse.emfcloud.modelserver.edit.EMFCommandType) MockitoJUnitRunner(org.mockito.junit.MockitoJUnitRunner) ResourceImpl(org.eclipse.emf.ecore.resource.impl.ResourceImpl) ArgumentMatchers.any(org.mockito.ArgumentMatchers.any) URI(org.eclipse.emf.common.util.URI) CoreMatchers.equalTo(org.hamcrest.CoreMatchers.equalTo) EMFModule(org.eclipse.emfcloud.jackson.module.EMFModule) CommandExecutionType(org.eclipse.emfcloud.modelserver.edit.CommandExecutionType) CodecsManager(org.eclipse.emfcloud.modelserver.emf.common.codecs.CodecsManager) Mock(org.mockito.Mock) RunWith(org.junit.runner.RunWith) CustomTypeSafeMatcher(org.hamcrest.CustomTypeSafeMatcher) AtomicReference(java.util.concurrent.atomic.AtomicReference) Supplier(java.util.function.Supplier) CCommand(org.eclipse.emfcloud.modelserver.command.CCommand) ResourceSet(org.eclipse.emf.ecore.resource.ResourceSet) ObjectNode(com.fasterxml.jackson.databind.node.ObjectNode) LinkedHashMap(java.util.LinkedHashMap) TypeSafeDiagnosingMatcher(org.hamcrest.TypeSafeDiagnosingMatcher) Json.prop(org.eclipse.emfcloud.modelserver.jsonschema.Json.prop) Answer(org.mockito.stubbing.Answer) EAttribute(org.eclipse.emf.ecore.EAttribute) EClass(org.eclipse.emf.ecore.EClass) Suppliers(com.google.common.base.Suppliers) EMFMatchers.eEqualTo(org.eclipse.emfcloud.modelserver.tests.util.EMFMatchers.eEqualTo) EncodingException(org.eclipse.emfcloud.modelserver.common.codecs.EncodingException) MatcherAssert.assertThat(org.hamcrest.MatcherAssert.assertThat) XmiCodec(org.eclipse.emfcloud.modelserver.common.codecs.XmiCodec) Before(org.junit.Before) InjectMocks(org.mockito.InjectMocks) Description(org.hamcrest.Description) MockitoHamcrest.intThat(org.mockito.hamcrest.MockitoHamcrest.intThat) EcoreUtil(org.eclipse.emf.ecore.util.EcoreUtil) Mockito.times(org.mockito.Mockito.times) IOException(java.io.IOException) Test(org.junit.Test) Mockito.when(org.mockito.Mockito.when) ResourceSetImpl(org.eclipse.emf.ecore.resource.impl.ResourceSetImpl) File(java.io.File) Mockito.verify(org.mockito.Mockito.verify) DICodecsManager(org.eclipse.emfcloud.modelserver.emf.common.codecs.DICodecsManager) ModelServerPathParametersV2(org.eclipse.emfcloud.modelserver.common.ModelServerPathParametersV2) FeatureMatcher(org.hamcrest.FeatureMatcher) ModelServerPathParametersV1(org.eclipse.emfcloud.modelserver.common.ModelServerPathParametersV1) Matcher(org.hamcrest.Matcher) OSUtil.osLineSeparator(org.eclipse.emfcloud.modelserver.tests.util.OSUtil.osLineSeparator) Collections(java.util.Collections) JsonCodec(org.eclipse.emfcloud.modelserver.emf.common.codecs.JsonCodec) JsonNode(com.fasterxml.jackson.databind.JsonNode) AtomicReference(java.util.concurrent.atomic.AtomicReference) URI(org.eclipse.emf.common.util.URI) LinkedHashMap(java.util.LinkedHashMap) EClass(org.eclipse.emf.ecore.EClass) EObject(org.eclipse.emf.ecore.EObject) List(java.util.List) XmiCodec(org.eclipse.emfcloud.modelserver.common.codecs.XmiCodec) Test(org.junit.Test)

Example 2 with Context

use of io.javalin.http.Context in project teku by ConsenSys.

the class GetBlockHeaders method handle.

@OpenApi(path = ROUTE, method = HttpMethod.GET, summary = "Get block headers", tags = { TAG_BEACON }, description = "Retrieves block headers matching given query. By default it will fetch current head slot blocks.", queryParams = { @OpenApiParam(name = SLOT), @OpenApiParam(name = PARENT_ROOT, description = "Not currently supported.") }, responses = { @OpenApiResponse(status = RES_OK, content = @OpenApiContent(from = GetBlockHeadersResponse.class)), @OpenApiResponse(status = RES_BAD_REQUEST), @OpenApiResponse(status = RES_INTERNAL_ERROR) })
@Override
public void handle(@NotNull final Context ctx) throws Exception {
    final Map<String, List<String>> queryParameters = ctx.queryParamMap();
    final Optional<Bytes32> parentRoot = SingleQueryParameterUtils.getParameterValueAsBytes32IfPresent(queryParameters, PARENT_ROOT);
    final Optional<UInt64> slot = SingleQueryParameterUtils.getParameterValueAsUInt64IfPresent(queryParameters, SLOT);
    try {
        ctx.future(chainDataProvider.getBlockHeaders(parentRoot, slot).thenApplyChecked(jsonProvider::objectToJSON).exceptionallyCompose(error -> handleError(ctx, error)));
    } catch (final IllegalArgumentException e) {
        ctx.status(SC_BAD_REQUEST);
        ctx.json(jsonProvider.objectToJSON(new BadRequest(e.getMessage())));
    }
}
Also used : AbstractHandler(tech.pegasys.teku.beaconrestapi.handlers.AbstractHandler) SafeFuture(tech.pegasys.teku.infrastructure.async.SafeFuture) TAG_BEACON(tech.pegasys.teku.infrastructure.http.RestApiConstants.TAG_BEACON) OpenApiContent(io.javalin.plugin.openapi.annotations.OpenApiContent) SLOT(tech.pegasys.teku.infrastructure.http.RestApiConstants.SLOT) RES_INTERNAL_ERROR(tech.pegasys.teku.infrastructure.http.RestApiConstants.RES_INTERNAL_ERROR) RES_BAD_REQUEST(tech.pegasys.teku.infrastructure.http.RestApiConstants.RES_BAD_REQUEST) PARENT_ROOT(tech.pegasys.teku.infrastructure.http.RestApiConstants.PARENT_ROOT) Context(io.javalin.http.Context) OpenApiResponse(io.javalin.plugin.openapi.annotations.OpenApiResponse) Map(java.util.Map) JsonProvider(tech.pegasys.teku.provider.JsonProvider) UInt64(tech.pegasys.teku.infrastructure.unsigned.UInt64) Bytes32(org.apache.tuweni.bytes.Bytes32) ChainDataProvider(tech.pegasys.teku.api.ChainDataProvider) HttpMethod(io.javalin.plugin.openapi.annotations.HttpMethod) BadRequest(tech.pegasys.teku.beaconrestapi.schema.BadRequest) Throwables(com.google.common.base.Throwables) SingleQueryParameterUtils(tech.pegasys.teku.beaconrestapi.SingleQueryParameterUtils) Handler(io.javalin.http.Handler) List(java.util.List) OpenApiParam(io.javalin.plugin.openapi.annotations.OpenApiParam) RES_OK(tech.pegasys.teku.infrastructure.http.RestApiConstants.RES_OK) Optional(java.util.Optional) SC_BAD_REQUEST(javax.servlet.http.HttpServletResponse.SC_BAD_REQUEST) GetBlockHeadersResponse(tech.pegasys.teku.api.response.v1.beacon.GetBlockHeadersResponse) OpenApi(io.javalin.plugin.openapi.annotations.OpenApi) NotNull(org.jetbrains.annotations.NotNull) DataProvider(tech.pegasys.teku.api.DataProvider) BadRequest(tech.pegasys.teku.beaconrestapi.schema.BadRequest) List(java.util.List) UInt64(tech.pegasys.teku.infrastructure.unsigned.UInt64) Bytes32(org.apache.tuweni.bytes.Bytes32) OpenApi(io.javalin.plugin.openapi.annotations.OpenApi)

Example 3 with Context

use of io.javalin.http.Context in project teku by ConsenSys.

the class PostBlock method handle.

@OpenApi(path = ROUTE, method = HttpMethod.POST, summary = "Publish a signed block", tags = { TAG_BEACON, TAG_VALIDATOR_REQUIRED }, requestBody = @OpenApiRequestBody(content = { @OpenApiContent(from = SignedBlock.class) }), description = "Submit a signed beacon block to the beacon node to be imported." + " The beacon node performs the required validation.", responses = { @OpenApiResponse(status = RES_OK, description = "Block has been successfully broadcast, validated and imported."), @OpenApiResponse(status = RES_ACCEPTED, description = "Block has been successfully broadcast, but failed validation and has not been imported."), @OpenApiResponse(status = RES_BAD_REQUEST, description = "Unable to parse request body."), @OpenApiResponse(status = RES_INTERNAL_ERROR, description = "Beacon node experienced an internal error."), @OpenApiResponse(status = RES_SERVICE_UNAVAILABLE, description = "Beacon node is currently syncing.") })
@Override
public void handle(final Context ctx) throws Exception {
    try {
        if (syncDataProvider.isSyncing()) {
            ctx.status(SC_SERVICE_UNAVAILABLE);
            ctx.json(BadRequest.serviceUnavailable(jsonProvider));
            return;
        }
        final SignedBeaconBlock signedBeaconBlock = validatorDataProvider.parseBlock(jsonProvider, ctx.body());
        ctx.future(validatorDataProvider.submitSignedBlock(signedBeaconBlock).thenApplyChecked(validatorBlockResult -> handleResponseContext(ctx, validatorBlockResult)));
    } catch (final JsonProcessingException ex) {
        ctx.status(SC_BAD_REQUEST);
        ctx.json(BadRequest.badRequest(jsonProvider, ex.getMessage()));
    } catch (final Exception ex) {
        LOG.error("Failed to post block due to internal error", ex);
        ctx.status(SC_INTERNAL_SERVER_ERROR);
        ctx.json(BadRequest.internalError(jsonProvider, ex.getMessage()));
    }
}
Also used : SC_INTERNAL_SERVER_ERROR(javax.servlet.http.HttpServletResponse.SC_INTERNAL_SERVER_ERROR) RES_SERVICE_UNAVAILABLE(tech.pegasys.teku.infrastructure.http.RestApiConstants.RES_SERVICE_UNAVAILABLE) TAG_BEACON(tech.pegasys.teku.infrastructure.http.RestApiConstants.TAG_BEACON) OpenApiContent(io.javalin.plugin.openapi.annotations.OpenApiContent) SC_SERVICE_UNAVAILABLE(javax.servlet.http.HttpServletResponse.SC_SERVICE_UNAVAILABLE) ValidatorDataProvider(tech.pegasys.teku.api.ValidatorDataProvider) RES_INTERNAL_ERROR(tech.pegasys.teku.infrastructure.http.RestApiConstants.RES_INTERNAL_ERROR) RES_BAD_REQUEST(tech.pegasys.teku.infrastructure.http.RestApiConstants.RES_BAD_REQUEST) Context(io.javalin.http.Context) OpenApiResponse(io.javalin.plugin.openapi.annotations.OpenApiResponse) JsonProvider(tech.pegasys.teku.provider.JsonProvider) RES_ACCEPTED(tech.pegasys.teku.infrastructure.http.RestApiConstants.RES_ACCEPTED) SignedBlock(tech.pegasys.teku.api.schema.interfaces.SignedBlock) HttpMethod(io.javalin.plugin.openapi.annotations.HttpMethod) SyncDataProvider(tech.pegasys.teku.api.SyncDataProvider) BadRequest(tech.pegasys.teku.beaconrestapi.schema.BadRequest) TAG_VALIDATOR_REQUIRED(tech.pegasys.teku.infrastructure.http.RestApiConstants.TAG_VALIDATOR_REQUIRED) JsonProcessingException(com.fasterxml.jackson.core.JsonProcessingException) Handler(io.javalin.http.Handler) Logger(org.apache.logging.log4j.Logger) SignedBeaconBlock(tech.pegasys.teku.api.schema.SignedBeaconBlock) SC_OK(javax.servlet.http.HttpServletResponse.SC_OK) RES_OK(tech.pegasys.teku.infrastructure.http.RestApiConstants.RES_OK) SC_BAD_REQUEST(javax.servlet.http.HttpServletResponse.SC_BAD_REQUEST) OpenApi(io.javalin.plugin.openapi.annotations.OpenApi) OpenApiRequestBody(io.javalin.plugin.openapi.annotations.OpenApiRequestBody) ValidatorBlockResult(tech.pegasys.teku.api.schema.ValidatorBlockResult) SC_ACCEPTED(javax.servlet.http.HttpServletResponse.SC_ACCEPTED) LogManager(org.apache.logging.log4j.LogManager) DataProvider(tech.pegasys.teku.api.DataProvider) SignedBeaconBlock(tech.pegasys.teku.api.schema.SignedBeaconBlock) JsonProcessingException(com.fasterxml.jackson.core.JsonProcessingException) JsonProcessingException(com.fasterxml.jackson.core.JsonProcessingException) OpenApi(io.javalin.plugin.openapi.annotations.OpenApi)

Example 4 with Context

use of io.javalin.http.Context in project teku by ConsenSys.

the class GetAggregateAttestation method handle.

@OpenApi(path = ROUTE, method = HttpMethod.GET, summary = "Get aggregated attestations", description = "Aggregates all attestations matching given attestation data root and slot.", tags = { TAG_VALIDATOR, TAG_VALIDATOR_REQUIRED }, queryParams = { @OpenApiParam(name = ATTESTATION_DATA_ROOT, description = "`String` HashTreeRoot of AttestationData that validator wants aggregated.", required = true), @OpenApiParam(name = SLOT, description = "`uint64` Non-finalized slot for which to create the aggregation.", required = true) }, responses = { @OpenApiResponse(status = RES_OK, content = @OpenApiContent(from = GetAggregatedAttestationResponse.class), description = "Returns aggregated `Attestation` object with same `AttestationData` root."), @OpenApiResponse(status = RES_BAD_REQUEST, description = "Invalid parameter supplied"), @OpenApiResponse(status = RES_NOT_FOUND, description = "No matching attestations were found"), @OpenApiResponse(status = RES_FORBIDDEN, description = "Beacon node was not assigned to aggregate on that subnet"), @OpenApiResponse(status = RES_INTERNAL_ERROR, description = "Beacon node internal error.") })
@Override
public void handle(Context ctx) throws Exception {
    try {
        final Map<String, List<String>> parameters = ctx.queryParamMap();
        if (parameters.size() < 2) {
            throw new IllegalArgumentException(String.format("Please specify both %s and %s", ATTESTATION_DATA_ROOT, SLOT));
        }
        Bytes32 beacon_block_root = getParameterValueAsBytes32(parameters, ATTESTATION_DATA_ROOT);
        final UInt64 slot = getParameterValueAsUInt64(parameters, SLOT);
        ctx.future(provider.createAggregate(slot, beacon_block_root).thenApplyChecked(optionalAttestation -> serializeResult(ctx, optionalAttestation)).exceptionallyCompose(error -> handleError(ctx, error)));
    } catch (final IllegalArgumentException e) {
        ctx.json(jsonProvider.objectToJSON(new BadRequest(e.getMessage())));
        ctx.status(SC_BAD_REQUEST);
    }
}
Also used : ATTESTATION_DATA_ROOT(tech.pegasys.teku.infrastructure.http.RestApiConstants.ATTESTATION_DATA_ROOT) AbstractHandler(tech.pegasys.teku.beaconrestapi.handlers.AbstractHandler) SC_INTERNAL_SERVER_ERROR(javax.servlet.http.HttpServletResponse.SC_INTERNAL_SERVER_ERROR) Attestation(tech.pegasys.teku.api.schema.Attestation) SafeFuture(tech.pegasys.teku.infrastructure.async.SafeFuture) OpenApiContent(io.javalin.plugin.openapi.annotations.OpenApiContent) ErrorResponse(tech.pegasys.teku.beaconrestapi.schema.ErrorResponse) SLOT(tech.pegasys.teku.infrastructure.http.RestApiConstants.SLOT) SingleQueryParameterUtils.getParameterValueAsBytes32(tech.pegasys.teku.beaconrestapi.SingleQueryParameterUtils.getParameterValueAsBytes32) ValidatorDataProvider(tech.pegasys.teku.api.ValidatorDataProvider) RES_INTERNAL_ERROR(tech.pegasys.teku.infrastructure.http.RestApiConstants.RES_INTERNAL_ERROR) TAG_VALIDATOR(tech.pegasys.teku.infrastructure.http.RestApiConstants.TAG_VALIDATOR) RES_BAD_REQUEST(tech.pegasys.teku.infrastructure.http.RestApiConstants.RES_BAD_REQUEST) Context(io.javalin.http.Context) OpenApiResponse(io.javalin.plugin.openapi.annotations.OpenApiResponse) Map(java.util.Map) JsonProvider(tech.pegasys.teku.provider.JsonProvider) UInt64(tech.pegasys.teku.infrastructure.unsigned.UInt64) RES_NOT_FOUND(tech.pegasys.teku.infrastructure.http.RestApiConstants.RES_NOT_FOUND) Bytes32(org.apache.tuweni.bytes.Bytes32) HttpMethod(io.javalin.plugin.openapi.annotations.HttpMethod) RES_FORBIDDEN(tech.pegasys.teku.infrastructure.http.RestApiConstants.RES_FORBIDDEN) BadRequest(tech.pegasys.teku.beaconrestapi.schema.BadRequest) TAG_VALIDATOR_REQUIRED(tech.pegasys.teku.infrastructure.http.RestApiConstants.TAG_VALIDATOR_REQUIRED) Throwables(com.google.common.base.Throwables) Handler(io.javalin.http.Handler) SC_NOT_FOUND(javax.servlet.http.HttpServletResponse.SC_NOT_FOUND) List(java.util.List) CompletionStage(java.util.concurrent.CompletionStage) OpenApiParam(io.javalin.plugin.openapi.annotations.OpenApiParam) SingleQueryParameterUtils.getParameterValueAsUInt64(tech.pegasys.teku.beaconrestapi.SingleQueryParameterUtils.getParameterValueAsUInt64) SC_OK(javax.servlet.http.HttpServletResponse.SC_OK) RES_OK(tech.pegasys.teku.infrastructure.http.RestApiConstants.RES_OK) Optional(java.util.Optional) SC_BAD_REQUEST(javax.servlet.http.HttpServletResponse.SC_BAD_REQUEST) GetAggregatedAttestationResponse(tech.pegasys.teku.api.response.v1.validator.GetAggregatedAttestationResponse) OpenApi(io.javalin.plugin.openapi.annotations.OpenApi) DataProvider(tech.pegasys.teku.api.DataProvider) BadRequest(tech.pegasys.teku.beaconrestapi.schema.BadRequest) List(java.util.List) UInt64(tech.pegasys.teku.infrastructure.unsigned.UInt64) SingleQueryParameterUtils.getParameterValueAsUInt64(tech.pegasys.teku.beaconrestapi.SingleQueryParameterUtils.getParameterValueAsUInt64) SingleQueryParameterUtils.getParameterValueAsBytes32(tech.pegasys.teku.beaconrestapi.SingleQueryParameterUtils.getParameterValueAsBytes32) Bytes32(org.apache.tuweni.bytes.Bytes32) OpenApi(io.javalin.plugin.openapi.annotations.OpenApi)

Example 5 with Context

use of io.javalin.http.Context in project cineast by vitrivr.

the class FindSegmentsByIdGetHandler method doGet.

@Override
public MediaSegmentQueryResult doGet(Context ctx) {
    final Map<String, String> parameters = ctx.pathParamMap();
    final String segmentId = parameters.get(ID_NAME);
    final MediaSegmentReader sl = new MediaSegmentReader(Config.sharedConfig().getDatabase().getSelectorSupplier().get());
    final List<MediaSegmentDescriptor> list = sl.lookUpSegment(segmentId).map(s -> {
        final List<MediaSegmentDescriptor> segments = new ArrayList<>(1);
        segments.add(s);
        return segments;
    }).orElse(new ArrayList<>(0));
    sl.close();
    return new MediaSegmentQueryResult("", list);
}
Also used : List(java.util.List) GetRestHandler(org.vitrivr.cineast.api.rest.handlers.interfaces.GetRestHandler) MediaSegmentReader(org.vitrivr.cineast.core.db.dao.reader.MediaSegmentReader) Context(io.javalin.http.Context) Map(java.util.Map) MediaSegmentQueryResult(org.vitrivr.cineast.api.messages.result.MediaSegmentQueryResult) MediaSegmentDescriptor(org.vitrivr.cineast.core.data.entities.MediaSegmentDescriptor) OpenApiDocumentation(io.javalin.plugin.openapi.dsl.OpenApiDocumentation) OpenApiBuilder(io.javalin.plugin.openapi.dsl.OpenApiBuilder) ArrayList(java.util.ArrayList) Config(org.vitrivr.cineast.standalone.config.Config) MediaSegmentReader(org.vitrivr.cineast.core.db.dao.reader.MediaSegmentReader) MediaSegmentDescriptor(org.vitrivr.cineast.core.data.entities.MediaSegmentDescriptor) MediaSegmentQueryResult(org.vitrivr.cineast.api.messages.result.MediaSegmentQueryResult) List(java.util.List) ArrayList(java.util.ArrayList)

Aggregations

Context (io.javalin.http.Context)16 List (java.util.List)13 Optional (java.util.Optional)10 Map (java.util.Map)9 Collectors (java.util.stream.Collectors)9 Handler (io.javalin.http.Handler)5 HttpMethod (io.javalin.plugin.openapi.annotations.HttpMethod)5 OpenApi (io.javalin.plugin.openapi.annotations.OpenApi)5 OpenApiContent (io.javalin.plugin.openapi.annotations.OpenApiContent)5 OpenApiResponse (io.javalin.plugin.openapi.annotations.OpenApiResponse)5 Inject (com.google.inject.Inject)4 Error (com.nexblocks.authguard.api.dto.entities.Error)4 RestMapper (com.nexblocks.authguard.rest.mappers.RestMapper)4 BodyHandler (com.nexblocks.authguard.rest.util.BodyHandler)4 IdempotencyHeader (com.nexblocks.authguard.rest.util.IdempotencyHeader)4 File (java.io.File)4 IOException (java.io.IOException)4 Collections (java.util.Collections)3 SC_BAD_REQUEST (javax.servlet.http.HttpServletResponse.SC_BAD_REQUEST)3 DataProvider (tech.pegasys.teku.api.DataProvider)3