-
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JSON-RPC Swagger UI - Open API #277
Milestone
Comments
This comment has been minimized.
This comment has been minimized.
Сделал конфиг для двух методов ping и help openapi: 3.0.0
info:
version: 1.0.0
title: Simple API
description: A simple API to illustrate OpenAPI concepts
servers:
- url: 0.0.0.0:9000
components:
securitySchemes:
BasicAuth:
type: http
scheme: digest
security:
- BasicAuth: []
paths:
/:
get:
description: Returns a list of artists
responses:
'200':
description: OK
/api/ping:
post:
operationId: example Ping
deprecated: false
summary: Example of JSON-RPC2 Post
description: Example post using JSON-RPC params.
tags: [JSONRPC]
parameters: []
responses:
'200':
description: OK
requestBody:
content:
application/json:
schema:
type: object
required:
- method
- id
- jsonrpc
- params
properties:
method:
type: string
default: ping
description: API method name
id:
type: integer
default: 1
format: int32
description: Request ID
jsonrpc:
type: string
default: '2.0'
description: JSON-RPC Version (2.0)
params:
title: Parameters
type: object
required: [id]
properties:
id:
type: integer
default: 1,
description: A param to include
/api/help:
post:
operationId: example Help
deprecated: false
summary: Example HELP
description: Example HELP JSON-RPC params.
tags: [JSONRPC]
parameters: []
responses:
'200':
description: Successful response
requestBody:
content:
application/json:
schema:
type: object
required:
- method
- id
- jsonrpc
- params
properties:
method:
type: string
default: help
description: API method name
id:
type: integer
default: 1
format: int32
description: Request ID
jsonrpc:
type: string
default: '2.0'
description: JSON-RPC Version (2.0)
params:
title: Parameters
type: object
required: [id]
properties:
id:
type: integer
default: 1,
description: A param to include
Теперь надо сделать его автогенерацию |
This comment has been minimized.
This comment has been minimized.
Генерация будет доступна по урлу |
сделал пакет https://www.npmjs.com/package/openapi-jsonrpc-jsdoc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Продолжение перехода к Open API
Примеры конфига
OAI/OpenAPI-Specification#664 (comment)
OAI/OpenAPI-Specification#664 (comment)
express-openapi
https://github.com/kogosoftwarellc/open-api/tree/master/packages/express-openapi
The text was updated successfully, but these errors were encountered: