hawry / deforest Goto Github PK
View Code? Open in Web Editor NEWRemove x-amazon tags and integrations from your OAS3/Swagger specification
Home Page: https://deforest.io
License: MIT License
Remove x-amazon tags and integrations from your OAS3/Swagger specification
Home Page: https://deforest.io
License: MIT License
Describe the bug
Running deforest on a CF template containing lists fails during debug logging.
Expected behavior
Do not fail the entire run if the logging calls don't work, especially for debug level logs.
Screenshots or error logs
$ deforest -d template.yml
DEBUG: parsing file 'template.yml'
DEBUG: read 33678 bytes from file
DEBUG: received 33678 bytes of data to clean
DEBUG: enabling CF tags
DEBUG: parsing yaml
DEBUG: creating cleaner queue
DEBUG: created queue with size 0
DEBUG: created <deforest.cleaners.CloudFormationCleaner instance at 0x7f08bc323638>
DEBUG: created <deforest.cleaners.DefaultCleaner instance at 0x7f08bc32dbd8>
DEBUG: created <deforest.cleaners.IgnoreCleaner instance at 0x7f08bc32dc20>
DEBUG: <deforest.cleaners.CloudFormationCleaner instance at 0x7f08bc323638> clean
Traceback (most recent call last):
File "/home/hawry/.local/bin/deforest", line 11, in <module>
sys.exit(main())
File "/home/hawry/.local/lib/python2.7/site-packages/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "/home/hawry/.local/lib/python2.7/site-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/home/hawry/.local/lib/python2.7/site-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/hawry/.local/lib/python2.7/site-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/home/hawry/.local/lib/python2.7/site-packages/deforest/deforest.py", line 26, in main
cleaned = f.clean()
File "/home/hawry/.local/lib/python2.7/site-packages/deforest/filecleaner.py", line 48, in clean
self.cleaner_queue.get().clean()
File "/home/hawry/.local/lib/python2.7/site-packages/deforest/cleaners.py", line 18, in clean
logging.debug("checking {}".format(self.caller.result))
TypeError: __repr__ returned non-string (type list)
Desktop (please complete the following information):
WSL on Win 10
OAS/Swagger version:
OAS 3
Additional context
CloudFormation template version 2010-09-09
Describe the bug
Running deforest on CF containing non-supported shorthand AWS functions fails.
Expected behavior
Ignore unknown AWS functions and continue with the export.
Screenshots or error logs
yaml.constructor.ConstructorError: could not determine a constructor for the tag '!Equals'
in "<string>", line 38, column 21:
ConditonalLogicalId: !Equals #If site equals ...
Desktop (please complete the following information):
WSL on Win 10
OAS/Swagger version:
OAS 3
Additional context
CloudFormation versino 2010-09-09
Describe the bug
Traceback (most recent call last):
File "/home/x/.local/bin/deforest", line 11, in <module>
sys.exit(main())
File "/home/x/.local/lib/python3.8/site-packages/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/home/x/.local/lib/python3.8/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/home/x/.local/lib/python3.8/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/x/.local/lib/python3.8/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
TypeError: main() got an unexpected keyword argument 'format'
Expected behavior
A cleaned template returned
OAS/Swagger version:
Additional context
Option variable has the wrong name in the @click.option part vs the method call
The current order in the output file is quite random, this should probably follow at least a more logical order than "first come first serve"
Deforest should be importable by other modules to enable use in automated tasks and custom build pipes
Describe the solution you'd like
Handle resources with the type AWS::Serverless::Api
in the same way as AWS::ApiGateway::RestApi
.
Additional context
If specified, the body is located under each resource #/Properties/DefinitionBody
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.