Giter VIP home page Giter VIP logo

apicenter's Introduction

ApiCenter

ApiCenter keeps track of all the services that run in your organization.

It is a API specification repository. You can upload all your OpenAPI (formerly known as Swagger) specifications, so you never have to go look for them anymore. Search through them, test them with SwaggerUI and download them. All in one central place.

It is an interface repository. Some services have more than one interface, or they maintain two versions of the same interface, or something else. ApiCenter can manage them all.

It is, finally, a service repository. If you ever wanted to know which services depend on yours, ApiCenter can help you with the answer. It can also tell you which version they use, to make your changes easier. And, if you want to consume a new service, ApiCenter is also there for you, showing you their interfaces and specs and maybe letting you know about a new version (in the future).

How to run

From source

  • Clone the repository
  • In a terminal, run ./gradlew :runAll
  • In a browser, go to localhost:8080

With Docker

We do not have an official Docker image yet. Until then, you can build your own by cloning the repository and executing the following steps:

  • ./gradlew bootBuildImage
  • docker run -p 8080:8080 tngtech/apicenter

This will start ApiCenter in a Docker container with an in-memory DB.

Built with

Contributing

Please see CONTRIBUTING.md

Versioning

ApiCenter uses semantic versioning. You should expect breakage if the major version changes.

License

ApiCenter is licensed under the Apache 2.0 license.

apicenter's People

Contributors

aaschmid avatar alexksbr avatar boidolr avatar catenoid avatar dependabot-preview[bot] avatar dependabot[bot] avatar fdw avatar sullis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

apicenter's Issues

Add changelogs/diffs to versions

As a developer of microservices, it would be very comfortable if I could easily compare different versions of one service's API. They could either be automatic diffs of the spec or, better, manually created changelogs between versions that the service's maintainers would have to create.

Permission Management

Users should be able to give permissions on specifications they've created. There should be three permission levels:

  • view - the user can view the specification
  • edit - the user can edit the specification
  • admin - the user can give permissions for the specification

Permission settings should be possible by clicking on an icon within the icon bar in the specification overview.

Support prerelease versions

Sometimes I, as a developer, want to "pre-publish" an in-development version of a spec to show the current changes or to test it, similar to artifact releases. This will help me to discuss changes with developers of other services, for example.

Such in-development versions must be appended with "-BETA[\d]" or "-RC[\d]", for example "2.1.0-BETA1" or "2.1.0.RC3".

Differences to the stable versions:

  • The main version of a spec should be the latest non-snapshot. Only if you unfold it, you can see the snapshot-versions.

Visualize relationships

Based on #12, a visualization should be possible. The easiest is to graphically show consuming and consumed artifacts for one service.
However, we could think about visualizing the whole microservice flotilla.

Support SNAPSHOT-versions

As a developer, I don't want a specific spec version of a service to change, so that communication is easier and clearer. However, there should be support for "SNAPSHOT" versions that are not stable and are allowed to change. I can use these for the development of the next spec version and share them even in their non-final state.

Spec versions can be defined as a snapshot by appending "-SNAPSHOT" to the version, for example "4.1.3-SNAPSHOT".

Snapshots are generally considered pre-release versions and should behave as such (see #63). Additionally, the have the following properties:

  • They are not immutable and a different spec with the same version can be uploaded. It overwrites the previous content.

Global Search Function

A global search function should be implemented, providing a search over all metadata and all contents of specification files.

A search-bar should be displayed in the header-bar and search results should show up as a pop-down list when the search term is entered.

Evaluate Pact for testing

Pact looks like an interesting tool that could be integrated with ApiCenter. To evaluate its usefulness, we should test our own interface with it.

Notifications

As a developer of a service whose spec is hosted in ApiCenter, I'd like to receive notifications for events - for example, if one of my dependencies updates its spec (see #12).

Implement an architecture that allows to send specific notifications to specific users/user groups. The notification should be triggered in the backend and shown in the frontend - they should be stored per user to show the user a list of all received notifications.

Create a cli tool to automatically upload new specification versions

As the developer of a nice but quickly changing web service, I want some way to automatically update the spec on my company's ApiCenter without having to do anything manually. This will make it effortless to keep ApiCenter up to date with the latest specs, which will in turn increase its usefulness.

There should be simple command line client that can upload a new version/specification of a service. It should be possible to integrate it with Maven and Gradle so that the spec can be uploaded with each build or deployment.

Of course, this means that there must not be any manual interaction. We need to find good defaults or another workaround.

Add a 404 page to the web app

Currently a GET for a non-existent specification in the webapp produces only toolbar + white page, with no indication of what has gone wrong.

blank

Configure Releases

Configure a Release-Plugin for Gradle and tag specific commits with version numbers.

Specification not shown

When selecting a specification in the overview, the specification is not shown.

It tries to request the specification via /api/v1/service/{servideId}/version/{versionId}, which is an unknown path in the backend.

Change phrasing

Instead of a "specification" having "versions", it should rather be a "service" having "specifications" (which might differ in their "version" or "language"). As a user, I can better understand these terms because they are more intuitive.

Add a "null" authentication service

As a interested potential user, I'd like to try out ApiCenter without needing Atlassian Crowd so that I can easily see what it is about.

We should offer a pseudo authentication service that allows anyone in without a password, and make it the default.

Versioning

Add possibility to have different versions of Specifications. These versions should be grouped together and additionally be associated in the UI.
Versions should be taken from the metadata fields in the OpenAPI specification (automatically assigned and updated).

"Not found" specification returns HTTP 500 instead of 404

$ curl http://localhost:8080/specifications/65039ab5-b610-4038-9afb-98b45f7fe9fc
{"id":"65039ab5-b610-4038-9afb-98b45f7fe9fc", ... }

$ curl http://localhost:8080/specifications/65039ab5-b610-4038-9afb-98b45f7fe9fd
{"timestamp":1549027851225,"status":500,"error":"Internal Server Error","message":"No value present","path":"/specifications/65039ab5-b610-4038-9afb-98b45f7fe9fd"}

Distinguish "owned" specifications in the list

Distinguish on specification overview between "general" specifications and specifications created by the logged in user. First of all, there needs to be an association on the data model and within the backend domain. There are some possibilities on how to distinguish your own and other specifications in the frontend:

  • Show your own specifications on top of the specification list
  • Somehow visually tag your own specification
  • Provide two seperate lists of specifications (e.g. "All Specifications" & "Your Specifications") where you can switch between both of them via tabs

frontend: peer-dependencies are missing

Just calling npm install for the first time results in these warnings:

npm WARN [email protected] requires a peer of acorn@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of popper.js@^1.14.7 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of graphql@^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of graphql@^0.6.0 || ^0.7.0 || ^0.8.0-b || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of graphql@^0.11.0 || ^0.12.0 || ^0.13.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of graphql@^0.11.0 || ^0.12.0 || ^0.13.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of graphql@^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of graphql@^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of graphql@^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of graphql@^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of typescript@^3.0.3 but none is installed. You must install peer dependencies yourself.

We should explicitely add those.

Create ADR (Architecture Decision Record)

As a dev I want to persist my decisions so that other developers are able to understand why I have made certain steps.

As a developer I want to have access to the already made decisions in the project so I can understand their code

User Management OAuth2

Extend the Authentication mechanism with an OAuth2 implementation. This authentication method should be exclusively configurable (i.e. only one authentication method can be active).

Debounce file upload

It's possible (though rare) for a single file upload attempt, to cause the creation of two separate specification entities, perhaps due to switch bouncing within the mouse.

The specifications below have been assigned different ids, so there is no internal inconsistency, however this behaviour is not expected. I haven't been able to replicate the problem with a specification including the x-api-id field. That may result in an error, seeing as ApiCenter forbids version string reuse within one service's specification set.

duplicate

Show deployment information (aka support environments)

As a developer, it would be nice to see in which environment (development, staging, production) a specific version of a service is deployed. This could either be found out automatically (be sending a request to a specific endpoint to see which version is deployed there) or set manually.

The automatic way would mean that for each service, the maintainers would have to specify the possible URL per environment, and ApiCenter would send requests to them to receive the deployed version.

Add help tooltips

As a user, I'd prefer elements of the documentation to be embedded within the app, eg. describing the purpose of buttons. ApiCenter's frontend already imports ng-bootstrap, which includes tooltips, so potentially something along the lines of this quick mock-up:

tootip

(This tooltip only appears on mouse hover, print-screen does not include the mouse cursor.) Perhaps have a global switch in a user's account preferences, to enable/disable all help messages once the user is accustomed to the interface.

Docs

Dependency Management

As the developer of one microservice in a fleet of others, I'd like some tool that can keep track of dependencies between our services. For example, I would like to easily see which services use my API (and in which version). Then, I could gather feedback from these developers.
Also, one could draw a graph of dependencies to check for circles or bottlenecks.

When adding/editing specifications, it should be possible to specify all other specifications that this specification depends on.

This feature, together with #11, can make it possible that you're notifified when one of our dependencies uploads a new spec version.

Session lost when navigating to external link

When the user clicks on a link with a different domain (in this case a link to the CommonMark specification), then uses the browser back button to return to ApiCenter, Spring gives a 403 Forbidden response.

This happens in both private and non-private browsing windows in Chrome & Firefox. However if in a non-private window, opening a new tab to ApiCenter's homepage (or just pressing the browser back button enough times to fetch the homepage) will succeed (ie. no 403 response).

403

Also manage artifacts without APIs

If ApiCenter is used to manage relationships between services (#12), then it should also be able to work with artifacts that only consume APIs but do not offer one themselves (f.e. frontends).

One way to do this could be to re-define API to "interface" in general, so that "Frontend/Web GUI" is one possible type besides OpenAPI etc.

Parse flow files

Frontend compilation generates a series of warnings of the form:

Module parse failed: Unexpected token (11:12)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|  */
| 
> import type {
|   ASTNode,
|   DocumentNode,

Others with the same problem (open issue), although the workaround posted there did not work for me.

Build a single deployable

Ideally, you should only have to deploy one artifact instead of backend and frontend separately. Maybe the frontend can be included in the static resources of the backend?

Store JWT in cookies not browser storage

HTML5 browser storage (localStorage and sessionStorage) is not a secure place for sensitive information like session tokens, as any Javascript on the page can access their contents, and may be vulnerable to XSS, see here.

Also, localStorage is shared across private browsing windows, meaning multiple sessions are not possible, see here.

Useful for implementation

Accept duplicate uploads of the same version

As a developer with a penchant for automatic tooling, I want my ApiCenter-Gradle-Plugin to automatically push the current spec when deploying or releasing so that ApiCenter always has the latest version. However, ApiCenter returns an error code if I try to push a version that already exists even if the content hasn't changed.

I want ApiCenter to compare the content of my new spec against the content of the already uploaded spec with the same version and return a HTTP code 202 (Accepted) if they match. Only if they have actually changed should ApiCenter send a 409 (Conflict) error.

POST /specifications returns wrong ID

After sending a POST request to /specifications, the returned ID in the JSON is not the ID stored in the database.
GET /specifications on the other hand returns the correct IDs.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.