Giter Site home page Giter Site logo

strongbugman / apiman Goto Github PK

View Code? Open in Web Editor NEW
110.0 110.0 2.0 171 KB

Api document support for any python web framework

License: BSD 3-Clause "New" or "Revised" License

Makefile 1.12% Python 94.31% HTML 4.56%
api bottle django falcon flask openapi redoc starlette swagger swagger-ui tornado

apiman's People

Contributors

strongbugman 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  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  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  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

Forkers

bluse1234 tarsil

apiman's Issues

Question: Does this tool provide security schemes?

I.e. if i have authenticated API, that uses JWT token, is there a way to have it enabled using apiman?

{
  "openapi": "3.0.1",
  "info": {
    "title": "Example app",
    "description": "Application home page",
    "version": "v2"
  },
  "securitySchemes": {
      "JWT": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "<JWT>"
        }
    }
}

For example having this template, can i have the authorization button on the swagger page? Like in the screenshot below?

image

Nested models schema mapping

Using the flask extension via

from apiman.flask import Extension

spec_path = "openapi.yml"
openapi = Extension(template=spec_path, decorators=(lambda f: f,))
openapi.init_app(app)

...

with this openapi.yml file

openapi: 3.0.0
servers:
  - url: 'http://localhost'
info:
  version: 0.0.1
  title: Run it
paths:
  /run:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RunDocument'
      responses:
        '200':
          description: Success

components:
  schemas:
    RunDocument:
      type: object
      required:
        - Prices
      properties:
        Prices:
          $ref: '#/components/schemas/PriceTimeseries'
    PriceTimeseries:
      type: array
      items:
        $ref: '#/components/schemas/PriceRecord'
    PriceRecord:
      type: object
      required:
        - Timestamp
      properties:
        Timestamp:
          type: number
          description: Unix Epoch in seconds

leads to

apiman_bug

where the RunDocument is composed correctly, but the TimeSeries wrongly says it is composed of TimeSeries (should be PriceRecord) although the tooltip shows the correct schema #components/schemas/PriceRecord.

Am I missing something?

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.