Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add OpenAPI 3.1 references test class and update router setup - Create a new test class `OpenAPI31ReferencesTest` for validating OpenAPI 3.1 references. - Implement setup method to initialize the router and load OpenAPI specs. - Update test cases to handle requests for both `/pets` and `/users` endpoints. - Modify the existing OpenAPI specification to include server information in the YAML configuration. * Implement OpenAPI specification support in RouterCLI Add command line option to specify OpenAPI specs and initialize routing with the provided spec. Integrate APIProxy for backend communication and request validation. Update MembraneCommandLine to handle new OpenAPI-related options. * Refactor RouterCLI to support OpenAPI specs and configuration files - Extract method to initialize router with OpenAPI spec - Simplify router initialization logic by adding a method for configuration file setup - Improve readability and maintainability of the RouterCLI class * Implement command line options for OpenAPI validation and port configuration - Add support for request and response validation flags in the RouterCLI. - Introduce port option to specify the API listening port via command line. - Update option names for clarity, changing "openapi-spec" to "openapi". * Add OpenAPI options to command line interface and remove redundant arguments * Update command line usage message to include script format for help output * Update command line usage message to include script format for help output * Add OAS command support to Membrane command line Enhance the MembraneCommandLine class by introducing support for the "oas" command. Update command validation logic and improve usage message formatting. Remove unused methods related to command validation. * Refactor command line structure to support OpenAPI command and improve parsing logic - Rename RouterCLI class to reflect new package structure. - Introduce CliCommand class for better command handling and option management. - Update MembraneCommandLine to utilize new command structure, enabling more intuitive command parsing. - Revise usage of command options such as `-c`, `-t`, `-p`, `-v`, and `-V` for improved functionality. - Adjust error handling and help printing mechanisms for better user experience. * Add CLI command tests and improve command option handling - Introduce `CliCommandTest` to validate parsing of command line options and subcommands. - Enhance `CliCommand` with methods to check if options are set and retrieve their values. - Update help output formatting to ensure correct display of commands and options. - Refactor some lines for better readability in `RouterCLI`. * Update OpenAPI specification file extension from ".yaml" to ".yml" in RouterCLI.java * Enhance command line interface for OpenAPI support - Update CLI help descriptions for clarity and consistency. - Add required option for specifying OpenAPI document location. - Modify exception handling to print root namespace help on parse errors. - Introduce `hasSubcommand` method to check for available subcommands. * Implement command line help option in RouterCLI and update tests for missing required options - Add help command functionality in `RouterCLI` to display usage information. - Introduce a new subcommand with required options in the CLI command structure. - Validate that an error is thrown when required options are not provided in the CLI tests. * Implement command line option handling and error management - Add `MissingRequiredOptionException` to handle missing required options more gracefully. - Update `RouterCLI` to print help message and exit on missing required options. - Refactor `CliCommand` to support shared options for commands and manage options setting. - Introduce new commands and update descriptions for clarity in `MembraneCommandLine`. * Add descriptions for new sub commands in CLI help text * Add command line support for OpenAPI file and URL Implement examples for starting the gateway with OpenAPI configuration in the command line interface. Enhance the `CliCommand` class to manage command usage examples and modify the help output to display these examples. Update the `RouterCLI` to accept OpenAPI file or URL as input for configuration. * Enhance CLI command structure by adding parent command reference - Introduce a `parent` property in `CliCommand` to track the parent command. - Update `addSubcommand` method to set the parent for subcommands. - Modify `printHelp` to display the full command path using the new `getCommandPath` method. * Refactor command path retrieval and improve help output formatting - Change `getCommandPath` method visibility from private to public. - Enhance help output to include examples section consistently. - Update test cases to verify command path and help output for commands and options. * Refactor command line options for clarity and consistency - Update option descriptions for help text to use consistent phrasing. - Improve naming of argument names for file paths and ports in command line options. - Streamline help output messages for user-friendly command line interface. * Fix CLI help description for OpenAPI command to correct "PListen" to "Listen" * Enhance command line options to specify OpenAPI validation for requests and responses * Add command line mode for OpenAPI configuration and validation in README.md Include usage examples for starting the service with an OpenAPI document and enabling request validation. * Refactoring --------- Co-authored-by: Thomas Bayer <bayer@predic8.de>
- Loading branch information