Add swagger model entry that accepts raw openapi schema text as yaml or json
- Dominant language
- Python
- Stars
- 4
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
Tentative strategy will be to have this model class parse the provided text and generate the proper model class representing the text.
``` python
@swagger.RAW(
yaml="""
get:
tags:
- developers
summary: searches inventory
operationId: searchInventory
description: |
By passing in the appropriate options, you can search for
available inventory in the system
parameters:
- in: query
name: searchString
description: pass an optional search string for looking up inventory
required: false
schema:
type: string
- in: query
name: skip
description: number of records to skip for pagination
schema:
type: integer
format: int32
minimum: 0
- in: query
name: limit
description: maximum number of records to return
schema:
type: integer
format: int32
minimum: 0
maximum: 50
responses:
'200':
description: search results matching criteria
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/InventoryItem'
'400':
description: bad input parameter"""
)
def route():
pass
```
This should generate a `swagger.GET` instance. Research possibility of pulling this also from docstrings
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by tracing the existing swagger model and GET generation paths referenced by the @swagger.RAW example. Determine how raw YAML or JSON should be parsed into a swagger.GET instance, and investigate whether docstrings can provide the same input; done means the intended behavior and parsing scope are established.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi, python
- Domain
- api, documentation
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100