-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
Hi
I have a model schema, and want to use Join within the schema to pull in the correct absolute reference to another model schema.
(Note - to simplify, I have actually just used Join here to join some strings to make up the URL).
What seems to happen is that Troposphere converts the JSON into a string, but doesn't like the Join function.
test_schema = t.add_resource(Model( "test", Name = "test", ContentType="application/json", RestApiId=Ref(testApi), Schema={ "$schema": "http://json-schema.org/draft-04/schema#", "title": "test", "id": "/test", "type": "object", "properties": { "_id": {"type": "string"}, "trades": { "type": "array", "items": [{"$ref": Join("",["https://apigateway.amazonaws.com/restapis/", "abc123456", "/models/testreference"] ) } ] } } } ))
I've also tried using the "Fn::Join" native Cloudformation JSON, and that does allow the JSON file to be built without error, but escapes the Fn::Join into a string, so that when CloudFormation runs, it just treats that as the reference without doing the join.