aws-amplify / docs

AWS Amplify Framework Documentation
https://docs.amplify.aws
Apache License 2.0
483 stars 1.05k forks source link

Gen2: Documentation / Connect Http Datasource is not correct (tsx) #7922

Open fvisticot opened 2 months ago

fvisticot commented 2 months ago

Description

The sample code is not Flutter code https://docs.amplify.aws/flutter/build-a-backend/data/custom-business-logic/connect-http-datasource/

Categories

Steps to Reproduce

Go to the documentation web site: https://docs.amplify.aws/flutter/build-a-backend/data/custom-business-logic/connect-http-datasource/

Screenshots

No response

Platforms

Flutter Version

3.24.0

Amplify Flutter Version

2.4.0

Deployment Method

Amplify Gen 2

Schema

No response

Jordan-Nelson commented 2 months ago

@fvisticot Thanks for bringing this to our attention.

The code snippets in sections 1-4 are expected to be TS as they are for the Gen 2 backend definition, which only supports TS. Section 5 however is client side code and should be Dart/Flutter code.

I am going to transfer this issue to our docs repo.

Jordan-Nelson commented 2 months ago

It appears that the same issue exists for iOS and Android as well. TS code is showing for all platforms.