Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added annotations for documentation #58

Closed
wants to merge 65 commits into from
Closed

Conversation

raupachz
Copy link
Contributor

Hi there,

we are using AWS Lambda with Scheduled Events and and as API Gateways for quite a while. Couple years actually and we are quite happy with the results. If you deploy Lambda Functions and forget about them it is often not easy to figure out which class in your JAR file matches the Function Name in the AWS Console.

If you happen to use a Lambda Function as an endpoint for AWS API Gateway it is even more confusing.

We found out that having to little annotations can make a big difference. It is just for documentation so nothing of the functionality gets touched.

For example:

@FunctionName("metric-service")
@Endpoint("/services/metrics/{date}")
public class MetricsHandler implements RequestHandler ...

With the annotations it is now much clearer what the MetricsHandler does.

I know it is just a tiny and ridiculous simple addition, but it was very helpful for us, maybe helpful for others.

kind regards
Björn

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

raupachz and others added 30 commits September 20, 2018 16:25
- keep the old methods for backward compatibility (marked as @deprecated)
- ignore folder with maven build results and IDEA-specific metadata
When using the config in the readme you get these errors:

```
Error processing element Lambda ([Appenders: null]): CLASS_NOT_FOUND
Unable to locate appender "lambda" for logger config "root"
```

The Lambda documentation site (https://docs.aws.amazon.com/lambda/latest/dg/java-logging.html) does not have the class name in the attribute, and removing the class name makes the errors above go away.
* Changed version of aws-lambda-java-core to 1.2.0

* Updated all mentions of 1.1.0 to 1.2.0
…aws#77)

* Adding authorizer field to collect context properites from authorizer

* Updating toString() method

* Adding authorizer to equals() & hashCode()

* Moving authorizer under ProxyRequestContext

* Switching to Map<String, Object> for authorizer
Without these declarations, the XML file cannot be validated correctly.

See examples:

* <https://maven.apache.org/pom.html#Quick_Overview>
* <https://github.com/aws/aws-sdk-java-v2/blob/master/aws-sdk-java/pom.xml>

The tool I'm using actually tries to validate these before using them
(<https://tiny.amazon.com/ibdzmlln/paste> -- Amazon internal link), so
that's why I ran into issues. I'm assuming most tools don't have the
validation enabled, so this is why others haven't reported this before.

The same issue can be easily replicated by pasting the current POM
files in <https://www.w3schools.com/xml/xml_validator.asp> as well
as just trying to open them with Firefox.

(P.s: Hello there Lambda team! We recently met in your Dublin office!)
This ensures inter-package dependencies are resolved locally
* Bump to 3.0.0
* Update Docs and Release Notes
* Classes to represent the request and response events for Application Load Balancer integration.
carlzogh and others added 27 commits December 1, 2020 18:24
Insert event does not have oldImage. Remove event does not have newImage. At this moment library just throws nullPointerException

Co-authored-by: Carl Zogheib <[email protected]>
Pre-release of `aws-lambda-java-events-sdk-transformer` version `2.0.1`
* Jackson uses the getters/setters names to name the JSON keys when serializing/deserializing, and Lombok automatically generate getters/setters. A class using the boolean variable IsBase64Encoded would have IsBase64Encoded/SetBase64Encoded methods. Jackson would convert them to base64Encoded key instead of isBase64Encoded. That is incompatible with the ALB and API Gateway JSON specification. By using lombok.getter.noIsPrefix = true, we would have GetIsBase64Encoded/SetIsBase64Encoded methods, and Jackson would convert them to the expected key isBase64Encoded.
…0.2` (aws#152)

Pre-release of `aws-lambda-java-events` version `3.1.1` and `aws-lambda-java-events-sdk-transformer` version `2.0.2`

Co-authored-by: Carl Zogheib <[email protected]>
Co-authored-by: Prajesh Ravindran <[email protected]>
Co-authored-by: Prajesh Ravindran <[email protected]>
Co-authored-by: Carl Zogheib <[email protected]>
* Bump junit and lombok dependencies in events and events-sdk libs

* Stage events v3.6.0 and sdk-transformer v2.0.8
@msailes
Copy link
Collaborator

msailes commented May 26, 2021

Hi @raupachz,

This is a great way to document your code, I can imagine it being useful in larger workloads.

I don't think it would be best suited to be added to this library. Would your organization consider open sourcing it within a module?

Thanks,

Mark

@msailes msailes closed this May 28, 2021
maxday added a commit that referenced this pull request Jun 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.