Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pradeepkps19/schema-gen
Generate API Schema from the API response (JSON)
https://github.com/pradeepkps19/schema-gen
api-schema generate-schema-from-response json-schema python-api-schema-generator restapi-schema schema-generation schema-generator
Last synced: 3 months ago
JSON representation
Generate API Schema from the API response (JSON)
- Host: GitHub
- URL: https://github.com/pradeepkps19/schema-gen
- Owner: pradeepkps19
- Created: 2024-05-17T20:02:05.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-05-18T10:58:16.000Z (8 months ago)
- Last Synced: 2024-09-26T19:05:23.908Z (3 months ago)
- Topics: api-schema, generate-schema-from-response, json-schema, python-api-schema-generator, restapi-schema, schema-generation, schema-generator
- Language: Python
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# API Schema Generator
This is to generate the schema for APIs from the API response JSONs.The Python library - genson SchemaBuilder is used.
### Steps to generate
1. Clone this repository to your Python3 installed machine.
2. Install **genson** like: ```pip install genson``` from your terminal.
3. Save your API responses as individual JSON files in the `responses` directory.
4. Run the **schemagen.py** like: ```python3 schemagen.py``` from your terminal.
5. Input the response JSON file name like: ```example-response.json``` as provided as an example.
6. If the JSON is valid, schema will be generated and saved as a new text file named **{{INPUT_JSON_FILE_NAME}}-schema.txt** under the **schema** folder.