This project provides OpenAPI specifications for Lithuania's government APIs. OpenAPI is a specification for building APIs that enables developers to design, document, and test their APIs.
To add a new OpenAPI specification, follow these steps:
-
Open
specifications.json
file. -
Add a new organization with their specifications in the following format:
{ "id": "<organization_id>", "label": "<organization_name>", "specifications": [ { "id": "<specification_id>", "label": "<specification_name>", "url": "<specification_url>" } ] }
Replace
<organization_id>
,<organization_name>
,<specification_id>
,<specification_name>
, and<specification_url>
with the appropriate values for your new OpenAPI specification. -
Save the file.
Your new OpenAPI specification will be automatically synced to the openapi
directory and will appear
at https://api.gov.lt/.
You can view OpenAPI specifications using tools such as the Swagger Editor.
This project is licensed under the MIT License. See the LICENSE file for details.
The specifications are synced to the openapi
directory using openapi.py. This
function downloads the specification, formats it, and saves it as a
JSON file with a name that includes the organization and specification IDs. If any errors occur during this process, a
warning is logged.