Skip to main content
Nordic APIs Platform Summit
October 9th, 2024
Using TypeSpec
for Open Finance
Standards
Chris Wood
About Me
Chris Wood
● Principal Architect @ Ozone API
● Writer @ Nordic APIs blog
● Outreach @ OpenAPI Initiative
(Slide added especially for Bill Doerrfeld)
How my colleagues think of me…
Since I started talking about TypeSpec…
About Ozone API
Helping banks deliver great,
standards based APIs.
Providing central players
with the technology to build
a thriving ecosystem.
We help
accelerate the
development of
open finance
Agenda
01. The briefest open finance overview
ever
02. Why is TypeSpec good for standards?
03. The TypeSpec Hit Parade
04. The TypeSpec Naughty List
05. Evolving our TypeSpec Toolchain
The briefest
open finance
standards
overview ever
01
What does open finance “open”?
(Using open banking as the example…)
The role of API standards
Why do API standards for open finance matter?
Equality
Standards
provides a level
playing field for
participants
Unity
Supports
interoperability
and simplifies
integration
Commonality
A given API is a
known quantity in
the market
Why is
TypeSpec good
for API
standards?
02
Package Structure
These are some of the
standards Ozone API supports
in different markets
TypeSpec is helping us
manage different API
standards closer to code while
still supporting OpenAPI
Separation
This is Gavin Wong
Gavin is a noted open
finance standards author
and TypeSpec fan
He likes to work on API
standards and ignore me
Reusable
This is Active or Historic
Currency and Amount from ISO
20022
It is used in open finance
standards a lot. It is royally fed
up with being copied and
pasted
TypeSpec can bring happiness
to this type definition
The
TypeSpec
Hit
Parade
03
Simplification
This is our API standards structure for
our latest API standards.
This is good.
We can separate different subject
areas and APIs logically while easily
sharing definitions in the team.
We still provide OpenAPI to the
market
Parity with Schema Objects
Remember our old friend
Active or Historic Currency
and Amount? Now in
TypeSpec
This is good.
We can emit at each new
standards version using the
same base model
Version Decorators
This is a version enum and
decorator.
This is very good for creating
versions of standards.
This lets us create one version
of the truth in our models,
and then render all versions
The
TypeSpec
Naughty
List
04
Security Schemes
Security Schemes are not
feature complete “enough”
for us.
This is a pain.
We use Overlay to add
them from OpenAPI
templates.
additionalProperties: false
There is no setting
additionalProperties to
false.
This is a pain.
We use Overlay to add
them based on patterns.
Orphaned Objects
I seemed to end up with many orphaned objects.
This is a pain.
We use Overlay to rid myself of them (and in the future
will use Spectral to find them).
Inline Response Objects
TypeSpec did not resolve Response Objects into
References, but declared inline.
This is a (minor) pain.
We shrug our shoulders and accept it (for now…)
Evolving
Our
TypeSpec
Toolchain
05
Next steps for Ozone
How will we evolve our use of TypeSpec?
Convert
Get all the open
finance API
standards we deal
with into TypeSpec
Package
Package up a
canonical model
for commonly used
definitions
Reuse
Use TypeSpec as the
starting point for our
TypeScript interfaces
and models
Target Toolchain
Thanks!
https://ozoneapi.com
https://linkedin.com/in/sensiblewood