Introduction to OpenAPI

A presentation at FOSDEM 2024 in February 2024 in Brussels, Belgium by Lorna Jane Mitchell

Slide 1

Slide 1

Introduction to OpenAPI Lorna Mitchell, Redocly @redocly ~ @lornajane ~ @lornajane@indieweb.social

Slide 2

Slide 2

OpenAPI https://openapis.org Open standard for describing HTTP APIs. •machine- and human-readable •JSON or YAML @redocly ~ @lornajane ~ @lornajane@indieweb.social

Slide 3

Slide 3

OpenAPI structure @redocly ~ @lornajane ~ @lornajane@indieweb.social

Slide 4

Slide 4

OpenAPI info Overview and metadata section @redocly ~ @lornajane ~ @lornajane@indieweb.social

Slide 5

Slide 5

OpenAPI YAML openapi: 3.1.0 info: title: Excellent API summary: An API for Excellence description: > This API is modern, and will make your applications 67% more excellent. Write as many words as you like here, markup is also supported. version: 1.0.0 license: name: Apache 2 identifier: Apache-2.0 externalDocs: url: https://example.com/docs description: Read more about this API, tutorials, and libraries @redocly ~ @lornajane ~ @lornajane@indieweb.social

Slide 6

Slide 6

OpenAPI paths @redocly ~ @lornajane ~ @lornajane@indieweb.social

Slide 7

Slide 7

OpenAPI paths @redocly ~ @lornajane ~ @lornajane@indieweb.social

Slide 8

Slide 8

OpenAPI schemas @redocly ~ @lornajane ~ @lornajane@indieweb.social

Slide 9

Slide 9

OpenAPI references @redocly ~ @lornajane ~ @lornajane@indieweb.social

Slide 10

Slide 10

OpenAPI components @redocly ~ @lornajane ~ @lornajane@indieweb.social

Slide 11

Slide 11

Power of OpenAPI @redocly ~ @lornajane ~ @lornajane@indieweb.social

Slide 12

Slide 12

@redocly ~ @lornajane ~ @lornajane@indieweb.social

Slide 13

Slide 13

@redocly ~ @lornajane ~ @lornajane@indieweb.social

Slide 14

Slide 14

@redocly ~ @lornajane ~ @lornajane@indieweb.social

Slide 15

Slide 15

@redocly ~ @lornajane ~ @lornajane@indieweb.social

Slide 16

Slide 16

@redocly ~ @lornajane ~ @lornajane@indieweb.social

Slide 17

Slide 17

Tools for OpenAPI https://openapi.tools/ @redocly ~ @lornajane ~ @lornajane@indieweb.social

Slide 18

Slide 18

OpenAPI editors The best editor is the one you know •Programmers’ editor, with plugins •Graphical editors @redocly ~ @lornajane ~ @lornajane@indieweb.social

Slide 19

Slide 19

OpenAPI governance Quality standards, consistently enforced •Agree written standards •Humans to check changes •CI (continuous integration) for all changes •Start small @redocly ~ @lornajane ~ @lornajane@indieweb.social

Slide 20

Slide 20

OpenAPI linting Let the machines do the work (within their skillset) •Validate OpenAPI •Enforce descriptions, examples •Follow naming conventions •Configure the rulesets for your needs @redocly ~ @lornajane ~ @lornajane@indieweb.social

Slide 21

Slide 21

OpenAPI documentation Read the docs for your docs! •Pull request previews help early feedback •Build/deploy should be fast and often •Track your key metrics (e.g. views) @redocly ~ @lornajane ~ @lornajane@indieweb.social

Slide 22

Slide 22

OpenAPI Community @redocly ~ @lornajane ~ @lornajane@indieweb.social

Slide 23

Slide 23

OpenAPI Community •Part of the Linux Foundation •Standard is developed in the open •https://openapis.org •Public GitHub repository •Active Slack groups •Weekly technical meeting @redocly ~ @lornajane ~ @lornajane@indieweb.social

Slide 24

Slide 24

OpenAPI SIGs Special Interest Groups (SIGs) focus on adjacent/upcoming standards •Workflows describe a sequence of API calls •Overlays map repeatable amendments to an OpenAPI file •OpenAPI 4.0 is under development (release due late 2024) @redocly ~ @lornajane ~ @lornajane@indieweb.social

Slide 25

Slide 25

OpenAPI Open standard for API descriptions @redocly ~ @lornajane ~ @lornajane@indieweb.social

Slide 26

Slide 26

Resources •https://openapis.org •https://lornajane.net •https://redocly.com •https://openapi.tools @redocly ~ @lornajane ~ @lornajane@indieweb.social