Repository: getmoto/moto

Issue:
iot describe_thing_type does not include thingTypeArn
`describe_thing_type` in the iot mock does not return `thingTypeArn`.

This should be included as per the [boto3 documentation](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/iot.html#IoT.Client.describe_thing_type).

To reproduce:

```
>>> import boto3
>>> import moto
>>> mock = moto.mock_iot()
>>> mock.start()
>>> client = boto3.client('iot')
>>> client.create_thing_type(thingTypeName='dummy')
{'ResponseMetadata': {'HTTPStatusCode': 200, 'HTTPHeaders': {'server': 'amazon.com'}, 'RetryAttempts': 0}, 'thingTypeName': 'dummy', 'thingTypeArn': 'arn:aws:iot:eu-west-1:1:thingtype/dummy'}
>>> client.describe_thing_type(thingTypeName='dummy')
{'ResponseMetadata': {'HTTPStatusCode': 200, 'HTTPHeaders': {'server': 'amazon.com'}, 'RetryAttempts': 0}, 'thingTypeName': 'dummy', 'thingTypeId': '4132577a-8127-410d-9bd0-20889b9ad242', 'thingTypeProperties': {}, 'thingTypeMetadata': {'deprecated': False, 'creationDate': datetime.datetime(2021, 1, 28, 10, 53, 3, 18000, tzinfo=tzlocal())}}

```

The issue appears to be that `moto.iot.models.FakeThingType.to_dict` does not include the `thingTypeArn` attribute.


Discussion:
Thanks for raising this @ezramorris - marking it as an enhancement!

Resolving patch:
diff --git a/moto/iot/models.py b/moto/iot/models.py
--- a/moto/iot/models.py
+++ b/moto/iot/models.py
@@ -67,6 +67,7 @@ def to_dict(self):
             "thingTypeId": self.thing_type_id,
             "thingTypeProperties": self.thing_type_properties,
             "thingTypeMetadata": self.metadata,
+            "thingTypeArn": self.arn,
         }
 
 
@@ -125,6 +126,7 @@ def to_dict(self):
             "version": self.version,
             "thingGroupProperties": self.thing_group_properties,
             "thingGroupMetadata": self.metadata,
+            "thingGroupArn": self.arn,
         }
 
 


Test patch:
diff --git a/tests/test_iot/test_iot.py b/tests/test_iot/test_iot.py
--- a/tests/test_iot/test_iot.py
+++ b/tests/test_iot/test_iot.py
@@ -218,6 +218,7 @@ def test_things():
     thing_type = client.create_thing_type(thingTypeName=type_name)
     thing_type.should.have.key("thingTypeName").which.should.equal(type_name)
     thing_type.should.have.key("thingTypeArn")
+    thing_type["thingTypeArn"].should.contain(type_name)
 
     res = client.list_thing_types()
     res.should.have.key("thingTypes").which.should.have.length_of(1)
@@ -228,6 +229,8 @@ def test_things():
     thing_type.should.have.key("thingTypeName").which.should.equal(type_name)
     thing_type.should.have.key("thingTypeProperties")
     thing_type.should.have.key("thingTypeMetadata")
+    thing_type.should.have.key("thingTypeArn")
+    thing_type["thingTypeArn"].should.contain(type_name)
 
     # thing
     thing = client.create_thing(thingName=name, thingTypeName=type_name)
@@ -1285,6 +1288,7 @@ def test_thing_groups():
     thing_group = client.create_thing_group(thingGroupName=group_name)
     thing_group.should.have.key("thingGroupName").which.should.equal(group_name)
     thing_group.should.have.key("thingGroupArn")
+    thing_group["thingGroupArn"].should.contain(group_name)
 
     res = client.list_thing_groups()
     res.should.have.key("thingGroups").which.should.have.length_of(1)
@@ -1297,6 +1301,8 @@ def test_thing_groups():
     thing_group.should.have.key("thingGroupProperties")
     thing_group.should.have.key("thingGroupMetadata")
     thing_group.should.have.key("version")
+    thing_group.should.have.key("thingGroupArn")
+    thing_group["thingGroupArn"].should.contain(group_name)
 
     # delete thing group
     client.delete_thing_group(thingGroupName=group_name)