Skip to content

Commit

Permalink
Fill additional information to OpenAPI spec
Browse files Browse the repository at this point in the history
Information such as API version, license and summary were missing in
the generated OpenAPI spec.
  • Loading branch information
0237h committed May 27, 2024
1 parent c7979ed commit 4156c75
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 5 deletions.
Binary file modified bun.lockb
Binary file not shown.
16 changes: 12 additions & 4 deletions src/typespec/openapi3.tsp
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
import "@typespec/http";
import "@typespec/openapi";
import "./models.tsp";

using TypeSpec.Http;

@service({
title: "Antelope Token API",
})
using TypeSpec.OpenAPI;

@service({ title: "Antelope Token API" })
@info({
summary: "Tokens information from the Antelope blockchains, powered by Substreams",
license: {
name: "MIT",
url: "https://github.com/pinax-network/antelope-token-api/blob/4f4bf36341b794c0ccf5b7a14fdf810be06462d2/LICENSE"
},
version: "3.0.0"
}) // From @typespec/openapi
namespace AntelopeTokenAPI;

// Error codes adapted from https://github.com/pinax-network/golang-base/blob/develop/response/errors.go
Expand Down
7 changes: 6 additions & 1 deletion tsp-output/@typespec/openapi3/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@
"openapi": "3.0.0",
"info": {
"title": "Antelope Token API",
"version": "0.0.0"
"summary": "Tokens information from the Antelope blockchains, powered by Substreams",
"license": {
"name": "MIT",
"url": "https://github.com/pinax-network/antelope-token-api/blob/4f4bf36341b794c0ccf5b7a14fdf810be06462d2/LICENSE"
},
"version": "3.0.0"
},
"tags": [
{
Expand Down

0 comments on commit 4156c75

Please sign in to comment.