goformation icon indicating copy to clipboard operation
goformation copied to clipboard

Schema claims AWS::Transfer::Server.Protocol is object instead of string

Open sander-bol opened this issue 2 years ago • 0 comments

AWS Transfer Family supports a list of protocols. These are defined as strings, and can be: "SFTP", "FTP", "FTPS" and "AS2". An example from the Cloudformation resource manual page:

 "Protocols": ["SFTP"],

The goformation schema defines AWS::Transfer::Server.Protocols as an array of AWS::Transfer::Server.Protocol objects.

"Protocols": {
    "items": {
        "$ref": "#/definitions/AWS::Transfer::Server.Protocol"
    },
    "type": "array"
},

which in turn are defined as simple objects.

"AWS::Transfer::Server.Protocol": {
            "additionalProperties": false,
            "properties": {},
            "type": "object"
        },

This causes schema linting to fail, because they expect an object where "SFTP" is now passed.

I believe the solution would be to remove Server.Protocol completely and replace the definition with an enum... but I have no experience with this repo, and no clue how the code generator that spits out the schema actually works.

sander-bol avatar Aug 18 '22 13:08 sander-bol