Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
## 🎟️ Tracking https://bitwarden.atlassian.net/browse/SM-1402 (Not part of this ticket, but agreed with @tangowithfoxtrot that it would make sense to do so) ## 📔 Objective Automatic PHP Schema generation using quicktype. The schema is not compatible with previously generated Swaggest based schema - PHP code changes are required (does not affect the usage, `README.md` and `example.php` works as before) Notable code changes: - Schema class fields are private, no setters or getters. Can only init the classes via constructor. (Could enable getters in schema generation, but the quicktype does not respond well with nested arrays that are part of schema, as a result PHP generated schema file does not compile) - Schema class constructors are initialized with named arguments, which is more readable than `new Command(null, null, null, null, null, $secrets_command, null, null) - Uses PHP native json serialization, but SDK does not react well to null fields, so adjusted the code to remove it just before JSON serialization. - Separated `AuthClient` into separate file - Imports with `uses` ## ⏰ Reminders before review - Contributor guidelines followed - All formatters and local linters executed and passed - Written new unit and / or integration tests where applicable - Protected functional changes with optionality (feature flags) - Used internationalization (i18n) for all UI strings - CI builds passed - Communicated to DevOps any deployment requirements - Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team ## 🦮 Reviewer guidelines <!-- Suggested interactions but feel free to use (or not) as you desire! --> - 👍 (`:+1:`) or similar for great changes - 📝 (`:memo:`) or ℹ️ (`:information_source:`) for notes or general info - ❓ (`:question:`) for questions - 🤔 (`:thinking:`) or 💭 (`:thought_balloon:`) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion - 🎨 (`:art:`) for suggestions / improvements - ❌ (`:x:`) or⚠️ (`:warning:`) for more significant problems or concerns needing attention - 🌱 (`:seedling:`) or ♻️ (`:recycle:`) for future improvements or indications of technical debt - ⛏ (`:pick:`) for minor or nitpick changes
- Loading branch information