Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ntut-xuan/s688
S688: A Python tool that validates if Swagger route descriptions match the app. It reads Swagger JSON, allowing scripted testing for payload-app alignment, confirming parity by checking non-400 errors post payload delivery.
https://github.com/ntut-xuan/s688
Last synced: 21 days ago
JSON representation
S688: A Python tool that validates if Swagger route descriptions match the app. It reads Swagger JSON, allowing scripted testing for payload-app alignment, confirming parity by checking non-400 errors post payload delivery.
- Host: GitHub
- URL: https://github.com/ntut-xuan/s688
- Owner: ntut-xuan
- Created: 2023-08-27T14:33:09.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-08-31T09:26:03.000Z (over 1 year ago)
- Last Synced: 2024-04-20T11:59:50.710Z (9 months ago)
- Language: Python
- Size: 20.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# S688 - Swagger Validation Tool
S688 is a validation tool written in Python that verifies whether Swagger route descriptions align with the actual application behavior. It achieves this by parsing Swagger JSON files to extract interface descriptions. Users can create scripts to test whether payloads match the Swagger specifications and if sending payloads to the application results in non-400 error responses, ensuring payload consistency.
## Features
- Validate Swagger route descriptions against the application.
- Read and parse Swagger JSON files to extract interface descriptions.
- Scripted testing for payload alignment with Swagger specifications.
- Confirm payload consistency by checking non-400 error responses on payload delivery.## Roadmap
### Phase 0: Setup and Foundation
- [x] **Repository Initialization**
- [x] Create a new GitHub repository.
- [x] Set up the initial project structure.- [x] **Environment Setup**
- [x] Install required dependencies specified in `requirements.txt`.- [x] **.gitignore File**
- [x] Create a `.gitignore` file to exclude unnecessary files from version control.- [x] **Basic README.md**
- [x] Create a comprehensive README.md with project overview, features, and usage instructions.### Phase 1: Swagger JSON Parsing
- [x] **Swagger JSON Parsing**
- [x] Implement logic to read and parse Swagger JSON files.
- [x] Extract API routes and descriptions.
- [x] Flatten Swagger JSON, expanding `$ref` references to components.### Phase 2: Transform Payload Descriptions to Actual Payload
- [x] **Payload Transformation Logic**
- [x] Develop logic to transform JSON payload descriptions to actual payloads.
- [x] Generate payloads based on Swagger route specifications.- [x] **Interactive Feedback**
- [x] Provide clear and informative feedback during payload transformation.
- [x] Display generated payloads and transformation status.### Phase 3: Application CLI and Command Processing
- [x] **Command-line Interface (CLI)**
- [x] Develop a user-friendly CLI for the application.
- [x] Implement CLI commands for processing Swagger JSON.- [x] **Command Processing Logic**
- [x] Enhance the application to read and process Swagger JSON files.
- [x] Implement logic to flatten Swagger JSON, expanding `$ref` references.- [x] **Interactive Feedback**
- [x] Provide clear and informative feedback during command execution.
- [x] Display results and messages directly within the CLI.### Phase 4: Assertion Class for Payload Validation
- [ ] **Assertion Class**
- [ ] Create an `Assertion` class to handle payload validation.
- [ ] Implement methods to compare payload against Swagger route specifications.- [ ] **Payload Validation Logic**
- [ ] Utilize the `Assertion` class to validate payload consistency.
- [ ] Check if payload adheres to Swagger specifications.### Phase 5: Documentation and Testing
- [ ] **Documentation**
- [ ] Document the tool's usage and functions in the README.md.
- [ ] Provide examples of payload validation and error scenarios.- [ ] **Unit Testing**
- [ ] Write unit tests to ensure payload validation functions correctly.
- [ ] Cover major validation cases and edge scenarios.### Phase 6: Finalization
- [ ] **Code Review**
- [ ] Review code for readability, modularity, and adherence to best practices.- [ ] **Contributing Guidelines**
- [ ] Include guidelines for external contributions, if desired.- [ ] **License**
- [ ] Choose and add an open-source license to the repository.### Phase 7: Release and Maintenance
- [ ] **Version Tagging**
- [ ] Tag a version for the initial release.- [ ] **Continuous Integration**
- [ ] Set up CI/CD for automated testing and deployment (optional).- [ ] **Maintenance**
- [ ] Monitor issues and address them for ongoing maintenance.