Navigation Menu

Skip to content

EquinoxOpenLibraryInitiative/evg-api-explorer

Repository files navigation

Evergreen API Explorer

This app displays metadata from the API of a running Evergreen server.

Usage

After launching the app, enter the hostname of an Evergreen system and click the "Connect to Evergreen" button. Once connected, choose an Evergreen service from the dropdown and optionally enter a search filter, then click the "Fetch API Information" button.

Installation

To build this app:

npm install

If you have a running Evergreen system, it is most convenient to then copy the compiled app somewhere under /openils/var/web. For example,

rsync -vaHx dist/ /openils/var/web/api-explorer/

The API explorer can then be found under https//HOST/api-explorer/.

If you need to run this app on a host different from your Evergreen server, at present some CORS headers need to be set on the Evergreen end:

<IfModule mod_headers.c>
    Header append Access-Control-Allow-Origin "*"
    Header append Access-Control-Allow-Headers "*"
    Header append Access-Control-Expose-Headers "*"
</IfModule>

Note that these CORS settings may be more permissive than you would care to have in production.

A future version of the explorer may provide a proxy so that CORS considerations don't apply.

Developing

Recommended IDE Setup

VSCode + Volar (and disable Vetur) + TypeScript Vue Plugin (Volar).

Type Support for .vue Imports in TS

TypeScript cannot handle type information for .vue imports by default, so we replace the tsc CLI with vue-tsc for type checking. In editors, we need TypeScript Vue Plugin (Volar) to make the TypeScript language service aware of .vue types.

If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a Take Over Mode that is more performant. You can enable it by the following steps:

  1. Disable the built-in TypeScript Extension
    1. Run Extensions: Show Built-in Extensions from VSCode's command palette
    2. Find TypeScript and JavaScript Language Features, right click and select Disable (Workspace)
  2. Reload the VSCode window by running Developer: Reload Window from the command palette.

Customize configuration

See Vite Configuration Reference.

Project Setup

npm install

Compile and Hot-Reload for Development

npm run dev

Type-Check, Compile and Minify for Production

npm run build

Lint with ESLint

npm run lint

Copyright

Copyright (c) 2022 Equinox Open Library Initiative, Inc.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

About

Tool for exploring the public API of an Evergreen system

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published