Skip to content

About

JSON edition of Eventor API OpenAPI spec / Swagger

Topics

Resources

Stars

1 star

Watchers

2 watching

Forks

Latest commit

 

History

47 Commits

Folders and files

Repository files navigation

eventor-api-openapi-spec-json

Validate OpenAPI spec

This is an experimental JSON model, not an API that serves JSON. The Eventor servers listed in openapi.yml return XML, as does the current eventor-proxy. The application/json responses and request bodies in this spec describe a possible representation after local XML-to-JSON conversion; they do not describe the media types returned or accepted by those servers. Some operations in this spec still describe XML.

Use eventor-api-openapi-spec for the actual Eventor HTTP API and for generated clients. This JSON spec has not been validated against a single converter or JSON-serving proxy, so do not use it as an executable API contract. Its Swagger UI is useful for browsing the proposed JSON shapes, but its "Try it out" requests cannot return the JSON responses shown here.

What is Eventor? Eventor is the event system for orienteering races in different countries, so if you want to arrange an orienteering event, you will probably register it in your local Eventor system to make other people see it and for them to register to your event (and where you can upload results after the event is done).

Usage of the Eventor API

To use the Eventor API, you need an API key.

The different Eventor websites are:

Add /api/documentation to either of the URLs to get the documentation for that particular Eventor website (the documentation is also included in the OpenAPI specification).

How did I create this

I have previously manually assembled an OpenAPI spec for the Eventor API with the XML content in mind. I have also previously converted the IOF v3 XSD into a JSON Schema with Jackson (see repo iof-orienteering-data-schemas). So I followed a guide on how to convert JSON schema to OpenAPI spec, using the openapi-contrib/json-schema-to-openapi-schema JavaScript library. This gave me a new file containing the IOF v3 JSON Schema as an OpenAPI spec. Then I copied this into the components section of the existing OpenAPI spec, and started adding $refs for request bodies and responses.

The IOF JSON schema does not cover Eventor's native XML structures on endpoints such as /events and /entries. iof-xml converts standard IOF XML to JSON, but its output has a document-type wrapper such as {"resultList": {...}} that this spec does not model. Unwrapped JAXB/Jackson output with null fields omitted validated against this spec's eventList and resultList schemas for IOF XML responses from events 23452 and 24759. rescript-eventor parses several native Eventor XML responses into its own typed records, with a different shape. There is currently no converter known to produce this spec's JSON for every endpoint.

See also

About

JSON edition of Eventor API OpenAPI spec / Swagger

Topics

Resources

Stars

1 star

Watchers

2 watching

Forks

Contributors

Languages