get-net / http-openapi Goto Github PK
View Code? Open in Web Editor NEWTarantool http server's openapi wrapper
Tarantool http server's openapi wrapper
db:query() returns nil without any messages about what went wrong
In openapi spec i can set
requestBody:
content:
multipart/form-data:
schema:
type: object
properties:
filename:
type: string
format: binary
But when i try post file data got vaildation error
{"filename":{"details":{"error":"invalid","actual":"table","expected":"binary"}}
It strange :)
For test and migration we need function for check how openapi.yaml converage by function.
When global security enabled it can be disabled by
/ping:
get:
summary: Checks if the server is running
security: [] # No security
responses:
'200':
description: Server is up and running
default:
description: Something is wrong
https://swagger.io/docs/specification/authentication/
It shold work in our implementation
From this spec
https://swagger.io/docs/specification/authentication/bearer-authentication/
If securitySchemes defined and security set global like this
openapi: 3.0.0
...
# 1) Define the security scheme type (HTTP bearer)
components:
securitySchemes:
bearerAuth: # arbitrary name for the security scheme
type: http
scheme: bearer
bearerFormat: JWT # optional, arbitrary value for documentation purposes
# 2) Apply the security globally to all operations
security:
- bearerAuth: [] # use the same name as above
use security handler on all paths. If path include local security use local security instead global.
ERROR:
LuajitError: /var/tarantool/app/.rocks/share/tarantool/gtn/openapi.lua:730: attempt to call method 'set_router' (a nil value)
fatal error, exiting the event loop
./app.lua
_G.app_config = nil
_G.uid = nil
_G.action = nil
local app = openapi(require("http.server"), require("http.router"), "schemas/api.yaml", {debug = false})
I got the error when I running app.lua , any help ? with two version are the same error, my tarantool version is 2.1.3-9-g85ad8508e and the lua version is 5.1.5
thanks in advance,
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.