profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/micronaut-projects/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.

micronaut-projects/micronaut-core 5045

Micronaut Application Framework

micronaut-projects/micronaut-examples 492

Example Projects Using Micronaut

micronaut-projects/micronaut-data 377

Ahead of Time Data Repositories

micronaut-projects/micronaut-graphql 65

A repository for Micronaut and GraphQL integrations

micronaut-projects/micronaut-aws 57

Projects specific to integrating Micronaut and Amazon Web Services (AWS)

micronaut-projects/micronaut-grpc 49

Integration between Micronaut and GRPC

micronaut-projects/micronaut-guides-old 43

Repository for Guides to using Micronaut

micronaut-projects/micronaut-gcp 36

Integration between Micronaut and Google Cloud Platform (GCP)

micronaut-projects/micronaut-gradle-plugin 35

A Gradle Plugin for Micronaut

micronaut-projects/micronaut-flyway 24

Integration between Micronaut and Flyway

push eventmicronaut-projects/micronaut-core

jameskleeh

commit sha bd75798bca0be174fd8b558274d4eb2058768198

Ensure the method is public and has 0 args

view details

push time in 6 hours

startedmicronaut-projects/micronaut-micrometer

started time in 7 hours

issue commentmicronaut-projects/micronaut-openapi

Interface Inheritance

micronaut-openapi is using 2.5.x in the gradle config. This version brings micronaut-inject 2.5.x which does not have getInterfaces method. :) Any help will be helpful.

https://github.com/micronaut-projects/micronaut-openapi/blob/0c8f9fe13b7be0db8e73938b8b2f9e1807444a5f/gradle.properties#L4

Thanks

cemo

comment created time in 8 hours

issue commentmicronaut-projects/micronaut-openapi

Interface Inheritance

@graemerocher https://github.com/micronaut-projects/micronaut-openapi/blob/master/openapi/src/main/java/io/micronaut/openapi/visitor/AbstractOpenApiVisitor.java#L1200

this line is returning null for interfaces. I am blindly guessing but calling classElement.isInterface() with classElement.getInterfaces().get(0) may resolve issue. Would you accept a PR? :)

cemo

comment created time in 9 hours

issue commentmicronaut-projects/micronaut-openapi

Interface Inheritance

- $ref: '#/components/schemas/BaseQueryParams' is missing in the first version. I can take a look if you guide me @graemerocher.

openapi: 3.0.1
info:
  title: swagger-spec
  version: "0.0"
paths:
  api/products:
    get:
      operationId: getProducts
      parameters: []
      responses:
        "200":
          description: getProducts 200 response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProdcatProductsResponse'
components:
  schemas:
    BaseQueryParams:
      type: object
      properties:
        locationId:
          type: string
        productId:
          type: integer
          format: int32
    ProdcatProductsResponse:
      type: object
      properties:
        searchMetadata:
          $ref: '#/components/schemas/ProdcatSearchMetadata'
    ProdcatSearchMetadata:
      allOf:
      - $ref: '#/components/schemas/BaseQueryParams'
      - type: object
        properties:
          page:
            $ref: '#/components/schemas/ProdcatSearchMetadata.Page'
    ProdcatSearchMetadata.Page:
      type: object
      properties:
        totalPages:
          type: integer
          format: int32
        totalResults:
          type: integer
          format: int32

cemo

comment created time in 9 hours

issue commentmicronaut-projects/micronaut-openapi

Interface Inheritance

I cleaned all jsonProperty annotations. Result is same. Actually It was simplified version piece of code but I forgot to delete that annotations.

cemo

comment created time in 9 hours

issue commentmicronaut-projects/micronaut-openapi

Interface Inheritance

@graemerocher How can I make it inherited?

cemo

comment created time in 9 hours

issue commentmicronaut-projects/micronaut-core

Cannot get response body in ExceptionHandler when http status >=400

@graemerocher this is a serious issue on our side. We are also using micronaut-problem. Not only external services but also internal services as well. Return problem and not resolving it is a serious problem. I could not understand why it is empty by the way in the first place but if a response has a body it must be handled.

nyilmaz

comment created time in 9 hours

issue commentmicronaut-projects/micronaut-openapi

Interface Inheritance

@JsonProperty is not an inherited annotation

cemo

comment created time in 9 hours

pull request commentmicronaut-projects/micronaut-core

Look through interfaces for pre destroy methods

Needs to check the method is zero arguments

jameskleeh

comment created time in 10 hours

issue openedmicronaut-projects/micronaut-openapi

Interface Inheritance

Expected Behavior

OpenApi spec must be created properly for interfaces too.

Actual Behaviour

It is working for classes but not interface based inheritance.

Steps To Reproduce

  1. checkout main branch
  2. clone https://github.com/cemo/swagger-spec
  3. mvn clean compile

Check target/classes/META-INF/swagger/swagger-spec-0.0.yml

It has not including BaseQueryParams


switch into working-properly

Check target/classes/META-INF/swagger/swagger-spec-0.0.yml

It has including BaseQueryParams

Environment Information

No response

Example Application

https://github.com/cemo/swagger-spec

Version

3.0.3

created time in 10 hours

create barnchmicronaut-projects/micronaut-core

branch : issue-6149

created branch time in 11 hours

issue openedmicronaut-projects/micronaut-aws

Cant not deserialize request to HttpRequest<String> when deployed in lambda with API Gateway

Expected Behavior

This works locally using the netty server. However it does not work when deployed in lambda with API Gateway.

Using a post method in a controller:

    @Post("/webhooks")
    public Object webhook(HttpRequest<String> request) throws Exception {

        //Never gets here
        
       log.info("Received request");

        String body = request.getBody().get();

        log.info("Request body: {}", body);
       
        return null;

My goal is to get the body of the request as a string. Expected behavior is a 200 response with logging lines showing the request body.

Actual Behaviour

Below is the stack trace in CloudWatch for when I post with a payload of: {"Some": "Test"}

[18:21:08.231] ERROR c.a.s.p.AwsProxyExceptionHandler - Called exception handler for:
io.micronaut.http.codec.CodecException: Error decoding JSON stream for type [B]: Cannot deserialize value of type `java.lang.String` from Object value (token `JsonToken.START_OBJECT`)
 at [Source: (String)"{
    "Some": "Test"
}"; line: 1, column: 1]
	at io.micronaut.jackson.codec.JacksonMediaTypeCodec.decode(JacksonMediaTypeCodec.java:224)
	at io.micronaut.function.aws.proxy.MicronautLambdaContainerHandler.decodeRequestBody(MicronautLambdaContainerHandler.java:479)
	at io.micronaut.function.aws.proxy.MicronautLambdaContainerHandler.executeRoute(MicronautLambdaContainerHandler.java:516)
	at io.micronaut.function.aws.proxy.MicronautLambdaContainerHandler.lambda$null$2(MicronautLambdaContainerHandler.java:322)
	at io.reactivex.internal.operators.flowable.FlowableDefer.subscribeActual(FlowableDefer.java:35)
	at io.reactivex.Flowable.subscribe(Flowable.java:14918)
	at io.reactivex.Flowable.subscribe(Flowable.java:14865)
	at io.micronaut.reactive.rxjava2.RxInstrumentedFlowable.subscribeActual(RxInstrumentedFlowable.java:57)
	at io.reactivex.Flowable.subscribe(Flowable.java:14918)
	at io.reactivex.internal.operators.flowable.FlowableOnErrorNext.subscribeActual(FlowableOnErrorNext.java:40)
	at io.reactivex.Flowable.subscribe(Flowable.java:14918)
	at io.reactivex.Flowable.blockingFirst(Flowable.java:5698)
	at io.micronaut.function.aws.proxy.MicronautLambdaContainerHandler.lambda$handleRequest$9(MicronautLambdaContainerHandler.java:367)
	at io.micronaut.http.context.ServerRequestContext.with(ServerRequestContext.java:68)
	at io.micronaut.function.aws.proxy.MicronautLambdaContainerHandler.handleRequest(MicronautLambdaContainerHandler.java:303)
	at io.micronaut.function.aws.proxy.MicronautLambdaContainerHandler.handleRequest(MicronautLambdaContainerHandler.java:80)
	at io.micronaut.function.aws.proxy.AbstractLambdaContainerHandler.proxy(AbstractLambdaContainerHandler.java:205)
	at io.micronaut.function.aws.proxy.MicronautLambdaHandler.handleRequest(MicronautLambdaHandler.java:68)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at lambdainternal.EventHandlerLoader$PojoMethodRequestHandler.handleRequest(EventHandlerLoader.java:263)
	at lambdainternal.EventHandlerLoader$PojoHandlerAsStreamHandler.handleRequest(EventHandlerLoader.java:180)
	at lambdainternal.EventHandlerLoader$2.call(EventHandlerLoader.java:902)
	at lambdainternal.AWSLambda.startRuntime(AWSLambda.java:340)
	at lambdainternal.AWSLambda.<clinit>(AWSLambda.java:63)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:348)
	at lambdainternal.LambdaRTEntry.main(LambdaRTEntry.java:150)
Caused by: com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize value of type `java.lang.String` from Object value (token `JsonToken.START_OBJECT`)
 at [Source: (String)"{
    "Some": "Test"
}"; line: 1, column: 1]
	at com.fasterxml.jackson.databind.exc.MismatchedInputException.from(MismatchedInputException.java:59)
	at com.fasterxml.jackson.databind.DeserializationContext.reportInputMismatch(DeserializationContext.java:1601)
	at com.fasterxml.jackson.databind.DeserializationContext.handleUnexpectedToken(DeserializationContext.java:1375)
	at com.fasterxml.jackson.databind.DeserializationContext.handleUnexpectedToken(DeserializationContext.java:1280)
	at com.fasterxml.jackson.databind.DeserializationContext.extractScalarFromObject(DeserializationContext.java:872)
	at com.fasterxml.jackson.databind.deser.std.StringDeserializer.deserialize(StringDeserializer.java:62)
	at com.fasterxml.jackson.databind.deser.std.StringDeserializer.deserialize(StringDeserializer.java:11)
	at com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.readRootValue(DefaultDeserializationContext.java:322)
	at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4593)
	at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3548)
	at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3516)
	at io.micronaut.jackson.codec.JacksonMediaTypeCodec.decode(JacksonMediaTypeCodec.java:221)
	... 29 common frames omitted

Steps To Reproduce

To reproduce, create a micronaut controller with a post method that takes an (HttpRequest<String>) OR (@Body String body). Deploy this to aws with API Gateway in front using proxy+.

Environment Information

Java 8 Micronaut 2.5.4

Example Application

No response

Version

2.5.4

created time in 11 hours

push eventmicronaut-projects/micronaut-kubernetes

Pavol Gressa

commit sha f07c82421073e79ced791319f4e6a78efa0739cb

use github-actions for oracle-cloud runners

view details

Pavol Gressa

commit sha ad5268e296a8d44c6ba533bc6b080a248570c137

polish

view details

push time in 12 hours

pull request commentmicronaut-projects/micronaut-core

Store repeatable annotations info and avoid reflection call

yeah good point, I guess the flag is needed, spotted a few other things

dstepanov

comment created time in 12 hours

Pull request review commentmicronaut-projects/micronaut-core

Store repeatable annotations info and avoid reflection call

 public static void contributeDefaults(AnnotationMetadata target, AnnotationMetad             source = source.getDeclaredMetadata();         }         if (target instanceof DefaultAnnotationMetadata && source instanceof DefaultAnnotationMetadata) {-            final Map<String, Map<CharSequence, Object>> existingDefaults = ((DefaultAnnotationMetadata) target).annotationDefaultValues;+            DefaultAnnotationMetadata damTarget = (DefaultAnnotationMetadata) target;+            DefaultAnnotationMetadata damSource = (DefaultAnnotationMetadata) source;+            final Map<String, Map<CharSequence, Object>> existingDefaults = damTarget.annotationDefaultValues;             if (existingDefaults != null) {-                final Map<String, Map<CharSequence, Object>> additionalDefaults = ((DefaultAnnotationMetadata) source).annotationDefaultValues;+                final Map<String, Map<CharSequence, Object>> additionalDefaults = damSource.annotationDefaultValues;                 if (additionalDefaults != null) {                     existingDefaults.putAll(                             additionalDefaults                     );                 }             } else {-                final Map<String, Map<CharSequence, Object>> additionalDefaults = ((DefaultAnnotationMetadata) source).annotationDefaultValues;+                final Map<String, Map<CharSequence, Object>> additionalDefaults = damSource.annotationDefaultValues;                 if (additionalDefaults != null) {-                    additionalDefaults.forEach(((DefaultAnnotationMetadata) target)::addDefaultAnnotationValues);+                    additionalDefaults.forEach(damTarget::addDefaultAnnotationValues);+                }+            }+            if (damSource.repeated != null && !damSource.repeated.isEmpty()) {+                if (damTarget.repeated == null) {+                    damTarget.repeated = new HashMap<>(damSource.repeated);

should be a linked hashmap to retain order?

dstepanov

comment created time in 12 hours

Pull request review commentmicronaut-projects/micronaut-core

Store repeatable annotations info and avoid reflection call

         return ANNOTATION_DEFAULTS.getOrDefault(annotation, Collections.emptyMap());     } +    /**+     * @param annotation The annotation+     * @return The repeatable annotation container.+     */+    public static String getRepeatableAnnotation(String annotation) {

Annotate with @Internal

dstepanov

comment created time in 12 hours

Pull request review commentmicronaut-projects/micronaut-core

Store repeatable annotations info and avoid reflection call

 public static void writeAnnotationDefaults(                 } //                staticInit.visitLabel(falseCondition);             }+            if (annotationMetadata.repeated != null && !annotationMetadata.repeated.isEmpty()) {+                Map<String, String> repeated = new HashMap<>();

Should be linked to retain order and incremental compile?

dstepanov

comment created time in 12 hours

Pull request review commentmicronaut-projects/micronaut-core

Store repeatable annotations info and avoid reflection call

 static void registerAnnotationType(AnnotationClassValue<?> annotationClassValue)         }     } +    /**+     * Registers repeatable annotations.+     *+     * @param repeatableAnnotations the repeatable annotations+     */+    static void registerRepeatableAnnotations(Map<String, String> repeatableAnnotations) {+        REPEATABLE_ANNOTATIONS.putAll(repeatableAnnotations);+    }++    /**+     * Remove Core repeatable annotations.+     *+     * @param repeatableAnnotations the repeatable annotations+     */+    static void removeCoreRepeatableAnnotations(@NotNull Map<String, String> repeatableAnnotations) {

Annotate with @Internal

dstepanov

comment created time in 12 hours

Pull request review commentmicronaut-projects/micronaut-core

Store repeatable annotations info and avoid reflection call

 static void registerAnnotationType(AnnotationClassValue<?> annotationClassValue)         }     } +    /**+     * Registers repeatable annotations.+     *+     * @param repeatableAnnotations the repeatable annotations+     */+    static void registerRepeatableAnnotations(Map<String, String> repeatableAnnotations) {

Annotate with @Internal

dstepanov

comment created time in 12 hours

Pull request review commentmicronaut-projects/micronaut-core

Store repeatable annotations info and avoid reflection call

 default boolean hasDeclaredStereotype(@Nullable Class<? extends Annotation>... a         return false;     } +    /**+     * Is repeatable annotation?+     * @param annotation The annotation+     * @return true if repeatable+     * @since 3.1+     */+    default boolean isRepeatableAnnotation(Class<? extends Annotation> annotation) {+        return annotation.getAnnotation(Repeatable.class) != null;+    }++    /**+     * Is repeatable annotation?+     * @param annotation The annotation+     * @return true if repeatable+     * @since 3.1+     */+    default boolean isRepeatableAnnotation(String annotation) {+        return false;+    }++    /**+     * Find repeatable annotation container.+     * @param annotation The annotation+     * @return optional repeatable annotation container+     * @since 3.1+     */+    default Optional<String> findRepeatableAnnotation(Class<? extends Annotation> annotation) {+        return Optional.ofNullable(annotation.getAnnotation(Repeatable.class))

Add nullability annotations to annotation parameter and if it can be null add null check or return Optional.empty() when null

dstepanov

comment created time in 12 hours

Pull request review commentmicronaut-projects/micronaut-core

Store repeatable annotations info and avoid reflection call

 default boolean hasDeclaredStereotype(@Nullable Class<? extends Annotation>... a         return false;     } +    /**+     * Is repeatable annotation?+     * @param annotation The annotation+     * @return true if repeatable+     * @since 3.1+     */+    default boolean isRepeatableAnnotation(Class<? extends Annotation> annotation) {+        return annotation.getAnnotation(Repeatable.class) != null;+    }++    /**+     * Is repeatable annotation?+     * @param annotation The annotation+     * @return true if repeatable+     * @since 3.1+     */+    default boolean isRepeatableAnnotation(String annotation) {+        return false;+    }++    /**+     * Find repeatable annotation container.+     * @param annotation The annotation+     * @return optional repeatable annotation container+     * @since 3.1+     */+    default Optional<String> findRepeatableAnnotation(Class<? extends Annotation> annotation) {+        return Optional.ofNullable(annotation.getAnnotation(Repeatable.class))+                .map(repeatable -> repeatable.value().getName());+    }++    /**+     * Find repeatable annotation container.+     * @param annotation The annotation+     * @return optional repeatable annotation container+     * @since 3.1+     */+    default Optional<String> findRepeatableAnnotation(String annotation) {

Add nullability annotations to annotation parameter

dstepanov

comment created time in 12 hours

Pull request review commentmicronaut-projects/micronaut-core

Store repeatable annotations info and avoid reflection call

 default boolean hasDeclaredAnnotation(@Nullable Class<? extends Annotation> anno      */     default boolean hasDeclaredStereotype(@Nullable Class<? extends Annotation> stereotype) {         if (stereotype != null) {-            Repeatable repeatable = stereotype.getAnnotation(Repeatable.class);-            if (repeatable != null) {-                return hasDeclaredStereotype(repeatable.value().getName());+            Optional<String> repeatable = findRepeatableAnnotation(stereotype);

For these internal calls maybe we can avoid optional wrapping?

dstepanov

comment created time in 12 hours

Pull request review commentmicronaut-projects/micronaut-core

Store repeatable annotations info and avoid reflection call

 default boolean hasDeclaredStereotype(@Nullable Class<? extends Annotation>... a         return false;     } +    /**+     * Is repeatable annotation?+     * @param annotation The annotation+     * @return true if repeatable+     * @since 3.1+     */+    default boolean isRepeatableAnnotation(Class<? extends Annotation> annotation) {

Add nullability annotations to annotation parameter and if it can be null add null check or return false when null

dstepanov

comment created time in 12 hours

PullRequestReviewEvent
PullRequestReviewEvent

issue commentmicronaut-projects/micronaut-core

Regression using ProxyHttpClient in M3.0.1 vs 2.5.x

Can you try with 3.0.2?

twobeeb

comment created time in 12 hours

push eventmicronaut-projects/micronaut-starter

micronaut-build

commit sha 280a7231a8793fe6d44b6d864653d7b59c4f6c6b

Deploying to gh-pages - 17:30:23

view details

push time in 12 hours

push eventmicronaut-projects/micronaut-starter

micronaut-build

commit sha 91fa8709fa77cc3766db0f28f7adb350b4b70c4e

Bump Micronaut Chocolatey package to v3.0.2

view details

push time in 13 hours