SpeciesFileGroup / taxonworks_api

Documentation for TaxonWorks APIs
http://api.taxonworks.org
Other
2 stars 6 forks source link

Add OpenAPI and Insomnia config? #30

Open gdower opened 4 years ago

gdower commented 4 years ago

I used oasraml-cli to convert the TaxonWorks api.raml to OpenAPI 3.0, which can be imported into the Insomnia client. This might be useful to provide to users, because it makes exploring the API easier. I've attached these files here.

Under manage environments, the following variables need to be configured within the Insomnia project environment:

image

{
  "user_token": "",
  "project_token": "",
  "project_id": "",
  "base_path": "/api/v1",
  "host": "sandpaper.taxonworks.org",
  "scheme": "https",
  "taxon_id": ""
}
LocoDelAssembly commented 4 years ago

Hi @gdower. We have a procedure to fire-up a browser-based console described in https://github.com/SpeciesFileGroup/taxonworks_api/blob/development/README.md image What I couldn't find how to do it is to change the base URL with the interface (besides editing the URL just before pressing send, but very cumbersome because each time you edit a param it is reset). Insomnia would have bonus points on this one by using the Manage Environments feature.

Is it always possible to convert from RAML to OpenAPI? Or perhaps rather than maintaining both in the repo I could add a script in package.json to run oasraml-cli and then fire-up insomnia? The converter is https://github.com/daviemakz/oas-raml-converter-cli?