AMF code snippets
In this document we'll go through examples of using AMF 5 from the Examples Repository, where you can clone, run, and test all AMF 5 examples in this documentation.
Cover the basics
If you don't know how to use AMF yet, refer to the Using AMF section to learn how to add AMF to your project and how to use AMFs configuration and client objects.
Code snippets
These examples showcase AMF functionality beyond the common use cases already documented in the AMF section.
How to add an EventListener
- Scala
- Java
- TypeScript
How to create a Transformation Pipeline
Note: Pipeline creation is only supported in Scala and Java.
- Scala
- Java
How to serialize a Shape
to JSON Schema
- Scala
- Java
- TypeScript
How to render a Domain Element
- Scala
- Java
- TypeScript
Render an API as a Stream
Note: Streaming is only supported in Scala and Java.
- Scala
- Java
Create an AMF configuration from an API
AMF can automatically detect the type of AMF Configuration needed for an API:
- Scala
- Java
- TypeScript