Skip to content

OpenAPI for examples endpoint #76

Description

@pdowler

I realised that it should be pretty each to add a simple OpenAPI endpoint description for this so I could include it in service API docs (located at the base URL for our services)

I already have a vanilla html page with examples that taplint and topcat are happy with, so I was just refining the details.

The OpenAPI schema needs to specify content-type values. Since DALI-1.1 says:

  • must be valid XML
  • must be viewable with a common web browser

I started with application/xhtml+xml as the content type (that's possibly more strict than DALI-1.1... TBD).


I tweaked the deployment so that it was served with the above (nominally correct) content-type:

> curl --head https://haproxy.cadc.dao.nrc.ca/argus/examples
...
HTTP/2 200 
accept-ranges: bytes
etag: W/"4978-1784113914000"
last-modified: Wed, 15 Jul 2026 11:11:54 GMT
content-type: application/xhtml+xml
content-length: 4978

After the content-type header change, the document needed this to render in firefox (151.0.3):

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.1//EN" "http://w3.org">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:schema="http://schema.org"
      xml:lang="en" lang="en">

taplint is still happy with the result so 👍

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions