Git Product home page Git Product logo

Comments (7)

jakejscott avatar jakejscott commented on August 15, 2024

Hi @ryanwilliams83 thanks for the suggestion! I think it should be pretty easy to support.

The stack class does have the 'transform' property on it that you need to use to say that this template should be transformed: AWSTemplateFormatVersion: '2010-09-09'

https://github.com/jakejscott/Humidifier/blob/master/src/Humidifier/Stack.cs#L21

Then I think it's a matter of implementing the resource types from the spec here:
https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md

Also the the event source types:
https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#event-source-types

I think the types should go in a directory called /src/Humidifier/Serverless

If you give me a couple days I can implement it for you.

from humidifier.

jakejscott avatar jakejscott commented on August 15, 2024

I also want to provide some sample projects, so I will add one for SAM first.

I'm also planning on creating a dotnet cli tooling similar to this:
https://github.com/aws/aws-extensions-for-dotnet-cli#aws-lambda-amazonlambdatools

from humidifier.

ryanwilliams83 avatar ryanwilliams83 commented on August 15, 2024

To make the framework extensible I added the AWSTypeName property to the Resource class.
I was then able to inherit from Humudifier.Resource in my own namespace and create my own representations of the Serverless objects.

This pull request includes the changes to the Generator, the JSON Serializer and the Resource class only.
It fails the automated tests because it doesn't include all of the generated code files.
#8

from humidifier.

jakejscott avatar jakejscott commented on August 15, 2024

Do you want to make all the classes implement the AWSTypeName so that it builds?

I think I'm happy with your approach. I've been wondering about how to make it extensible so nice work!

from humidifier.

jakejscott avatar jakejscott commented on August 15, 2024

@ryanwilliams83 I've just pushed a new 0.2.5 version of the library.

I also added a stub for implementing the rest of the serverlss resource types: https://github.com/jakejscott/Humidifier/blob/master/src/Humidifier/Serverless/Function.cs

Thanks for the contribution :)

from humidifier.

WedioDK avatar WedioDK commented on August 15, 2024

@jakejscott Would it be possible for you to fully support the SAM model as defined by AWS? E.g. all types.

https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-template.html#serverless-sam-template-application

from humidifier.

jakejscott avatar jakejscott commented on August 15, 2024

What's missing? I added some more properties to this class a while back but just manually....

I found out that there is some JSON that describes the serverless cloudformation specs here:
https://github.com/awslabs/aws-cdk/blob/master/packages/%40aws-cdk/cfnspec/spec-source/000_sam.spec.json

But I just haven't had time to implement it as I don't use the Serverless transforms stuff and prefer to use the underlying resources directly (as Serverless templates just get expanded out in Cloudformation).

Feel free to let me know what's missing, or a PR and I can take a look.

Cheers

from humidifier.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.