Code Monkey home page Code Monkey logo

bs-api-specification's Introduction

Logo BugStalker API

BugStalker projects:

About The Project

The API specification project serves as the backbone for both frontend and backend development in the BugStalker application. It defines the API endpoints, data models, and services required for seamless communication between the frontend and backend applications.

In essence, the API Specification project not only documents the endpoints but also provides a mechanism to generate implementations of the specified endpoints, enhancing productivity and maintainability of the BugStalker application.

Built With

Getting Started

In order to generate web services and models you need to install ng-openapi-gen.

Prerequisites

Installation

  1. Clone the repo
    git clone https://github.com/Kaliszando/bs-api-specification.git
  2. Set output directory for fronted project in package.json
    "gen-web": "ng-openapi-gen --output ../bs-web-client/src/app/api"
  3. Build API project.
    mvn clean install
  • api-bundler.py runs automatically before install phase. Bundler merges all yaml models from src/main/schemas and endpoints from src/main/schemas into single openapi.yaml file.
  • run gen-web runs automatically after install phase. It generates frontend models and endpoint implementations.

Contact

Adam Kalisz [email protected]

LinkedIn @adam-kalisz

Other links linktr.ee/kaliszando

(back to top)

bs-api-specification's People

Contributors

kaliszando avatar

Stargazers

 avatar

Watchers

Lucian avatar  avatar

bs-api-specification's Issues

Web API generator refactor [OpenApi code gen, python script bundler, project restructure, exec-maven-plugin]

ng-openapi-gen fails on generating sevices outside main yaml. It should be fixed to improve code readability. If it can't be fixed default code gen should be used: https://github.com/swagger-api/swagger-codegen

๐Ÿ›‘ drawbacks:

  • a lot of refactor code on fronted app
  • creating services manually

โœ” Alternativelty: refactor api project structure:

  • each model in separate yaml file
  • each group of services for one enpoint in one yaml file

Changes

  • replaced swagger-codegen-maven-plugin with openapi-generator-maven-plugin (default methods in endpoints interfaces)
  • added api-bundler.py file for generating main openapi.yaml file from schemas and paths directory (due to OpenAPI3 restrictions), resulting in more modular approach to organizing API project structure
  • replaced maven-antrun-plugin with exec-maven-plugin

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.