diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index dfa0752d..c85a4522 100755 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -25,6 +25,7 @@ Model/DryRun.php Model/ExtendedUserDataResponse.php Model/ExtendedUserDataResponseAllOf.php Model/FeaturedProjectResponse.php +Model/InlineObject.php Model/JWTResponse.php Model/LoginRequest.php Model/MediaCategoryResponse.php @@ -64,6 +65,7 @@ Resources/docs/Model/DryRun.md Resources/docs/Model/ExtendedUserDataResponse.md Resources/docs/Model/ExtendedUserDataResponseAllOf.md Resources/docs/Model/FeaturedProjectResponse.md +Resources/docs/Model/InlineObject.md Resources/docs/Model/JWTResponse.md Resources/docs/Model/LoginRequest.md Resources/docs/Model/MediaCategoryResponse.md @@ -88,6 +90,7 @@ Resources/docs/Model/UpgradeTokenRequest.md Resources/docs/Model/UploadErrorResponse.md Service/JmsSerializer.php Service/SerializerInterface.php +Service/StrictJsonDeserializationVisitor.php Service/SymfonyValidator.php Service/TypeMismatchException.php Service/ValidatorInterface.php @@ -106,6 +109,7 @@ Tests/Model/DryRunTest.php Tests/Model/ExtendedUserDataResponseAllOfTest.php Tests/Model/ExtendedUserDataResponseTest.php Tests/Model/FeaturedProjectResponseTest.php +Tests/Model/InlineObjectTest.php Tests/Model/JWTResponseTest.php Tests/Model/LoginRequestTest.php Tests/Model/MediaCategoryResponseTest.php diff --git a/.php-cs-fixer.cache b/.php-cs-fixer.cache index 18c87c91..11c08f65 100755 --- a/.php-cs-fixer.cache +++ b/.php-cs-fixer.cache @@ -1 +1 @@ -{"php":"8.1.0","version":"3.4.0","indent":" ","lineEnding":"\n","rules":{"blank_line_after_namespace":true,"braces":{"allow_single_line_anonymous_class_with_empty_body":true,"allow_single_line_closure":true},"class_definition":{"single_line":true},"constant_case":true,"elseif":true,"function_declaration":true,"indentation_type":true,"line_ending":true,"lowercase_keywords":true,"method_argument_space":{"on_multiline":"ignore"},"no_break_comment":true,"no_closing_tag":true,"no_space_around_double_colon":true,"no_spaces_after_function_name":true,"no_spaces_inside_parenthesis":true,"no_trailing_whitespace":true,"no_trailing_whitespace_in_comment":true,"single_blank_line_at_eof":true,"single_class_element_per_statement":true,"single_import_per_statement":true,"single_line_after_imports":true,"switch_case_semicolon_to_colon":true,"switch_case_space":true,"visibility_required":true,"encoding":true,"full_opening_tag":true,"align_multiline_comment":true,"array_indentation":true,"blank_line_before_statement":{"statements":["return"]},"combine_consecutive_issets":true,"combine_consecutive_unsets":true,"empty_loop_body":{"style":"braces"},"escape_implicit_backslashes":true,"explicit_indirect_variable":true,"explicit_string_variable":true,"heredoc_to_nowdoc":true,"method_chaining_indentation":true,"multiline_comment_opening_closing":true,"multiline_whitespace_before_semicolons":{"strategy":"new_line_for_chained_calls"},"no_extra_blank_lines":{"tokens":["case","continue","curly_brace_block","default","extra","parenthesis_brace_block","square_brace_block","switch","throw","use"]},"no_null_property_initialization":true,"no_superfluous_elseif":true,"no_useless_else":true,"no_useless_return":true,"operator_linebreak":{"only_booleans":true},"ordered_class_elements":{"order":["use_trait"]},"php_unit_internal_class":true,"php_unit_test_class_requires_covers":true,"phpdoc_add_missing_param_annotation":true,"phpdoc_no_empty_return":true,"phpdoc_order":true,"phpdoc_order_by_value":true,"phpdoc_types_order":{"null_adjustment":"always_last","sort_algorithm":"none"},"phpdoc_var_annotation_correct_order":true,"return_assignment":true,"simple_to_complex_string_variable":true,"single_line_comment_style":{"comment_types":["hash"]},"single_line_throw":true,"array_syntax":true,"backtick_to_shell_exec":true,"binary_operator_spaces":true,"cast_spaces":true,"class_attributes_separation":{"elements":{"method":"one"}},"clean_namespace":true,"concat_space":true,"echo_tag_syntax":true,"empty_loop_condition":true,"fully_qualified_strict_types":true,"function_typehint_space":true,"general_phpdoc_tag_rename":{"replacements":{"inheritDocs":"inheritDoc"}},"include":true,"increment_style":true,"integer_literal_case":true,"lambda_not_used_import":true,"linebreak_after_opening_tag":true,"magic_constant_casing":true,"magic_method_casing":true,"native_function_casing":true,"native_function_type_declaration_casing":true,"no_alias_language_construct_call":true,"no_alternative_syntax":true,"no_binary_string":true,"no_blank_lines_after_phpdoc":true,"no_empty_comment":true,"no_empty_phpdoc":true,"no_empty_statement":true,"no_leading_namespace_whitespace":true,"no_mixed_echo_print":true,"no_multiline_whitespace_around_double_arrow":true,"no_short_bool_cast":true,"no_singleline_whitespace_before_semicolons":true,"no_spaces_around_offset":true,"no_superfluous_phpdoc_tags":{"allow_mixed":true,"allow_unused_params":true},"no_trailing_comma_in_list_call":true,"no_trailing_comma_in_singleline_array":true,"no_unneeded_control_parentheses":{"statements":["break","clone","continue","echo_print","return","switch_case","yield","yield_from"]},"no_unneeded_curly_braces":{"namespaces":true},"no_unset_cast":true,"no_unused_imports":true,"no_whitespace_before_comma_in_array":true,"normalize_index_brace":true,"object_operator_without_whitespace":true,"ordered_imports":true,"php_unit_fqcn_annotation":true,"php_unit_method_casing":true,"phpdoc_align":true,"phpdoc_annotation_without_dot":true,"phpdoc_indent":true,"phpdoc_inline_tag_normalizer":true,"phpdoc_no_access":true,"phpdoc_no_alias_tag":true,"phpdoc_no_package":true,"phpdoc_no_useless_inheritdoc":true,"phpdoc_return_self_reference":true,"phpdoc_scalar":true,"phpdoc_separation":true,"phpdoc_single_line_var_spacing":true,"phpdoc_summary":true,"phpdoc_tag_type":{"tags":{"inheritDoc":"inline"}},"phpdoc_to_comment":true,"phpdoc_trim":true,"phpdoc_trim_consecutive_blank_line_separation":true,"phpdoc_types":true,"phpdoc_var_without_name":true,"protected_to_private":true,"semicolon_after_instruction":true,"single_quote":true,"single_space_after_construct":true,"space_after_semicolon":{"remove_in_empty_for_expressions":true},"standardize_increment":true,"standardize_not_equals":true,"switch_continue_to_break":true,"trailing_comma_in_multiline":true,"trim_array_spaces":true,"types_spaces":true,"unary_operator_spaces":true,"whitespace_after_comma_in_array":true,"yoda_style":true,"blank_line_after_opening_tag":true,"compact_nullable_typehint":true,"declare_equal_normalize":true,"lowercase_cast":true,"lowercase_static_reference":true,"new_with_braces":true,"no_blank_lines_after_class_opening":true,"no_leading_import_slash":true,"no_whitespace_in_blank_line":true,"return_type_declaration":true,"short_scalar_cast":true,"single_blank_line_before_namespace":true,"single_trait_insert_per_statement":true,"ternary_operator_spaces":true,"doctrine_annotation_array_assignment":{"operator":":"},"doctrine_annotation_braces":true,"doctrine_annotation_indentation":true,"doctrine_annotation_spaces":{"before_array_assignments_colon":false},"strict_param":true},"hashes":{"DependencyInjection\/OpenAPIServerExtension.php":3828920726,"DependencyInjection\/Compiler\/OpenAPIServerApiPass.php":1829091243,"Api\/SearchApiInterface.php":518666210,"Api\/UtilityApiInterface.php":3920800004,"Api\/AuthenticationApiInterface.php":1195695865,"Api\/NotificationsApiInterface.php":1859291363,"Api\/ProjectsApiInterface.php":1706060644,"Api\/ApiServer.php":79040370,"Api\/UserApiInterface.php":2134781278,"Api\/MediaLibraryApiInterface.php":1378106757,"Service\/ValidatorInterface.php":556327333,"Service\/JmsSerializer.php":3900462519,"Service\/TypeMismatchException.php":269245387,"Service\/SerializerInterface.php":4201061557,"Service\/StrictJsonDeserializationVisitor.php":347726109,"Service\/SymfonyValidator.php":862763093,"Model\/NotificationsCountResponse.php":3623099034,"Model\/SearchResponse.php":854585032,"Model\/UpdateUserRequest.php":1118262861,"Model\/NotificationsType.php":719306592,"Model\/UploadErrorResponse.php":3401892665,"Model\/ExtendedUserDataResponse.php":2654090172,"Model\/RefreshRequest.php":1771209065,"Model\/OAuthLoginRequest.php":218723401,"Model\/RegisterErrorResponse.php":1689160143,"Model\/LoginRequest.php":2882134721,"Model\/DryRun.php":2796930170,"Model\/MediaCategoryResponse.php":1559780699,"Model\/ProjectsCategory.php":2818774906,"Model\/UpdateUserErrorResponse.php":1655578474,"Model\/NotificationContent.php":2579597032,"Model\/RegisterRequest.php":4006776873,"Model\/ProjectReportRequest.php":2632733239,"Model\/SurveyResponse.php":824744844,"Model\/ExtendedUserDataResponseAllOf.php":3828104490,"Model\/BasicUserDataResponse.php":4289816001,"Model\/JWTResponse.php":2212035145,"Model\/BaseUser.php":294445835,"Model\/MediaPackageResponse.php":293148734,"Model\/ProjectResponse.php":3421128790,"Model\/FeaturedProjectResponse.php":821804746,"Model\/UpgradeTokenRequest.php":3815835445,"Model\/NotificationResponse.php":3188921355,"Model\/MediaFileResponse.php":1408576140,"OpenAPIServerBundle.php":3736143798,"autoload.php":500593274,"Controller\/NotificationsController.php":736624322,"Controller\/Controller.php":741232022,"Controller\/SearchController.php":2836148378,"Controller\/MediaLibraryController.php":2091388081,"Controller\/AuthenticationController.php":2640947777,"Controller\/ProjectsController.php":1657232488,"Controller\/UtilityController.php":3755128510,"Controller\/UserController.php":693458281}} \ No newline at end of file +{"php":"8.1.1","version":"3.5.0","indent":" ","lineEnding":"\n","rules":{"blank_line_after_namespace":true,"braces":{"allow_single_line_anonymous_class_with_empty_body":true,"allow_single_line_closure":true},"class_definition":{"single_line":true},"constant_case":true,"elseif":true,"function_declaration":true,"indentation_type":true,"line_ending":true,"lowercase_keywords":true,"method_argument_space":{"on_multiline":"ignore"},"no_break_comment":true,"no_closing_tag":true,"no_space_around_double_colon":true,"no_spaces_after_function_name":true,"no_spaces_inside_parenthesis":true,"no_trailing_whitespace":true,"no_trailing_whitespace_in_comment":true,"single_blank_line_at_eof":true,"single_class_element_per_statement":true,"single_import_per_statement":true,"single_line_after_imports":true,"switch_case_semicolon_to_colon":true,"switch_case_space":true,"visibility_required":true,"encoding":true,"full_opening_tag":true,"align_multiline_comment":true,"array_indentation":true,"blank_line_before_statement":{"statements":["return"]},"combine_consecutive_issets":true,"combine_consecutive_unsets":true,"empty_loop_body":{"style":"braces"},"escape_implicit_backslashes":true,"explicit_indirect_variable":true,"explicit_string_variable":true,"heredoc_to_nowdoc":true,"method_chaining_indentation":true,"multiline_comment_opening_closing":true,"multiline_whitespace_before_semicolons":{"strategy":"new_line_for_chained_calls"},"no_extra_blank_lines":{"tokens":["case","continue","curly_brace_block","default","extra","parenthesis_brace_block","square_brace_block","switch","throw","use"]},"no_null_property_initialization":true,"no_superfluous_elseif":true,"no_useless_else":true,"no_useless_return":true,"operator_linebreak":{"only_booleans":true},"ordered_class_elements":{"order":["use_trait"]},"php_unit_internal_class":true,"php_unit_test_class_requires_covers":true,"phpdoc_add_missing_param_annotation":true,"phpdoc_no_empty_return":true,"phpdoc_order":true,"phpdoc_order_by_value":true,"phpdoc_types_order":{"null_adjustment":"always_last","sort_algorithm":"none"},"phpdoc_var_annotation_correct_order":true,"return_assignment":true,"simple_to_complex_string_variable":true,"single_line_comment_style":{"comment_types":["hash"]},"single_line_throw":true,"array_syntax":true,"backtick_to_shell_exec":true,"binary_operator_spaces":true,"cast_spaces":true,"class_attributes_separation":{"elements":{"method":"one"}},"clean_namespace":true,"concat_space":true,"echo_tag_syntax":true,"empty_loop_condition":true,"fully_qualified_strict_types":true,"function_typehint_space":true,"general_phpdoc_tag_rename":{"replacements":{"inheritDocs":"inheritDoc"}},"include":true,"increment_style":true,"integer_literal_case":true,"lambda_not_used_import":true,"linebreak_after_opening_tag":true,"magic_constant_casing":true,"magic_method_casing":true,"native_function_casing":true,"native_function_type_declaration_casing":true,"no_alias_language_construct_call":true,"no_alternative_syntax":true,"no_binary_string":true,"no_blank_lines_after_phpdoc":true,"no_empty_comment":true,"no_empty_phpdoc":true,"no_empty_statement":true,"no_leading_namespace_whitespace":true,"no_mixed_echo_print":true,"no_multiline_whitespace_around_double_arrow":true,"no_short_bool_cast":true,"no_singleline_whitespace_before_semicolons":true,"no_spaces_around_offset":true,"no_superfluous_phpdoc_tags":{"allow_mixed":true,"allow_unused_params":true},"no_trailing_comma_in_list_call":true,"no_trailing_comma_in_singleline_array":true,"no_unneeded_control_parentheses":{"statements":["break","clone","continue","echo_print","return","switch_case","yield","yield_from"]},"no_unneeded_curly_braces":{"namespaces":true},"no_unset_cast":true,"no_unused_imports":true,"no_whitespace_before_comma_in_array":true,"normalize_index_brace":true,"object_operator_without_whitespace":true,"ordered_imports":true,"php_unit_fqcn_annotation":true,"php_unit_method_casing":true,"phpdoc_align":true,"phpdoc_annotation_without_dot":true,"phpdoc_indent":true,"phpdoc_inline_tag_normalizer":true,"phpdoc_no_access":true,"phpdoc_no_alias_tag":true,"phpdoc_no_package":true,"phpdoc_no_useless_inheritdoc":true,"phpdoc_return_self_reference":true,"phpdoc_scalar":true,"phpdoc_separation":true,"phpdoc_single_line_var_spacing":true,"phpdoc_summary":true,"phpdoc_tag_type":{"tags":{"inheritDoc":"inline"}},"phpdoc_to_comment":true,"phpdoc_trim":true,"phpdoc_trim_consecutive_blank_line_separation":true,"phpdoc_types":true,"phpdoc_var_without_name":true,"protected_to_private":true,"semicolon_after_instruction":true,"single_quote":true,"single_space_after_construct":true,"space_after_semicolon":{"remove_in_empty_for_expressions":true},"standardize_increment":true,"standardize_not_equals":true,"switch_continue_to_break":true,"trailing_comma_in_multiline":true,"trim_array_spaces":true,"types_spaces":true,"unary_operator_spaces":true,"whitespace_after_comma_in_array":true,"yoda_style":true,"blank_line_after_opening_tag":true,"compact_nullable_typehint":true,"declare_equal_normalize":true,"lowercase_cast":true,"lowercase_static_reference":true,"new_with_braces":true,"no_blank_lines_after_class_opening":true,"no_leading_import_slash":true,"no_whitespace_in_blank_line":true,"return_type_declaration":true,"short_scalar_cast":true,"single_blank_line_before_namespace":true,"single_trait_insert_per_statement":true,"ternary_operator_spaces":true,"doctrine_annotation_array_assignment":{"operator":":"},"doctrine_annotation_braces":true,"doctrine_annotation_indentation":true,"doctrine_annotation_spaces":{"before_array_assignments_colon":false},"strict_param":true},"hashes":{"Api\/ApiServer.php":2976191341,"Api\/AuthenticationApiInterface.php":4056301272,"Api\/UtilityApiInterface.php":696381994,"Api\/SearchApiInterface.php":3777011961,"Api\/MediaLibraryApiInterface.php":4011966238,"Api\/ProjectsApiInterface.php":2274295398,"Api\/NotificationsApiInterface.php":1776205421,"Api\/UserApiInterface.php":2732075326,"DependencyInjection\/Compiler\/OpenAPIServerApiPass.php":1513832626,"DependencyInjection\/OpenAPIServerExtension.php":3407680049,"Controller\/Controller.php":12461229,"Controller\/UserController.php":1714771641,"Controller\/SearchController.php":3164397298,"Controller\/NotificationsController.php":3226415982,"Controller\/MediaLibraryController.php":1112572832,"Controller\/AuthenticationController.php":1057375113,"Controller\/UtilityController.php":824691397,"Controller\/ProjectsController.php":318289128,"Service\/ValidatorInterface.php":556327333,"Service\/SerializerInterface.php":4201061557,"Service\/SymfonyValidator.php":862763093,"Service\/TypeMismatchException.php":269245387,"Service\/JmsSerializer.php":3900462519,"Service\/StrictJsonDeserializationVisitor.php":347726109,"Model\/SurveyResponse.php":3732784679,"Model\/ProjectsCategory.php":2272404046,"Model\/NotificationContent.php":562092002,"Model\/RegisterErrorResponse.php":3819220119,"Model\/MediaFileResponse.php":3986750657,"Model\/UpdateUserRequest.php":2716129505,"Model\/RefreshRequest.php":1293446475,"Model\/UploadErrorResponse.php":1400018497,"Model\/LoginRequest.php":2447646449,"Model\/BaseUser.php":730507859,"Model\/RegisterRequest.php":2769654402,"Model\/MediaCategoryResponse.php":1812634530,"Model\/FeaturedProjectResponse.php":3623541586,"Model\/DryRun.php":1493077432,"Model\/UpgradeTokenRequest.php":1280027659,"Model\/ProjectReportRequest.php":1971774335,"Model\/OAuthLoginRequest.php":2419091161,"Model\/BasicUserDataResponse.php":3952633401,"Model\/SearchResponse.php":2008254574,"Model\/ProjectResponse.php":2544448142,"Model\/ExtendedUserDataResponseAllOf.php":3590534986,"Model\/UpdateUserErrorResponse.php":2326826384,"Model\/NotificationResponse.php":3804181826,"Model\/MediaPackageResponse.php":3760893865,"Model\/JWTResponse.php":1514456045,"Model\/InlineObject.php":3010436179,"Model\/ExtendedUserDataResponse.php":4187208245,"Model\/NotificationsCountResponse.php":1706080797,"Model\/NotificationsType.php":3843986424,"OpenAPIServerBundle.php":2164828755,"autoload.php":762476643}} \ No newline at end of file diff --git a/Api/ApiServer.php b/Api/ApiServer.php index 8bded9e6..a17ee384 100755 --- a/Api/ApiServer.php +++ b/Api/ApiServer.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.1.0 + * The version of the OpenAPI document: v1.0.65 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Api/AuthenticationApiInterface.php b/Api/AuthenticationApiInterface.php index 60d76aed..693bd87a 100755 --- a/Api/AuthenticationApiInterface.php +++ b/Api/AuthenticationApiInterface.php @@ -15,7 +15,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.1.0 + * The version of the OpenAPI document: v1.0.65 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Api/MediaLibraryApiInterface.php b/Api/MediaLibraryApiInterface.php index 1ed2e793..cb3f4392 100755 --- a/Api/MediaLibraryApiInterface.php +++ b/Api/MediaLibraryApiInterface.php @@ -15,7 +15,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.1.0 + * The version of the OpenAPI document: v1.0.65 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Api/NotificationsApiInterface.php b/Api/NotificationsApiInterface.php index f3e8915a..f5d3ad4c 100755 --- a/Api/NotificationsApiInterface.php +++ b/Api/NotificationsApiInterface.php @@ -15,7 +15,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.1.0 + * The version of the OpenAPI document: v1.0.65 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Api/ProjectsApiInterface.php b/Api/ProjectsApiInterface.php index a45b8369..2c0aa431 100755 --- a/Api/ProjectsApiInterface.php +++ b/Api/ProjectsApiInterface.php @@ -15,7 +15,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.1.0 + * The version of the OpenAPI document: v1.0.65 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Api/SearchApiInterface.php b/Api/SearchApiInterface.php index d5af7490..eb2472bc 100755 --- a/Api/SearchApiInterface.php +++ b/Api/SearchApiInterface.php @@ -15,7 +15,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.1.0 + * The version of the OpenAPI document: v1.0.65 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Api/UserApiInterface.php b/Api/UserApiInterface.php index 62dfd7e5..33eb16ce 100755 --- a/Api/UserApiInterface.php +++ b/Api/UserApiInterface.php @@ -15,7 +15,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.1.0 + * The version of the OpenAPI document: v1.0.65 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -28,6 +28,7 @@ namespace OpenAPI\Server\Api; +use OpenAPI\Server\Model\InlineObject; use OpenAPI\Server\Model\RegisterRequest; use OpenAPI\Server\Model\UpdateUserRequest; @@ -112,6 +113,17 @@ public function userPost(RegisterRequest $register_request, string $accept_langu */ public function userPut(UpdateUserRequest $update_user_request, string $accept_language = null, &$responseCode, array &$responseHeaders); + /** + * Operation userResetPasswordPost. + * + * Request email to reset password + * + * @param \OpenAPI\Server\Model\InlineObject $inline_object (required) + * @param \int $responseCode The HTTP response code to return + * @param \array $responseHeaders Additional HTTP headers to return with the response () + */ + public function userResetPasswordPost(InlineObject $inline_object, &$responseCode, array &$responseHeaders); + /** * Operation usersSearchGet. * diff --git a/Api/UtilityApiInterface.php b/Api/UtilityApiInterface.php index b57ace63..30a6ad5e 100755 --- a/Api/UtilityApiInterface.php +++ b/Api/UtilityApiInterface.php @@ -15,7 +15,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.1.0 + * The version of the OpenAPI document: v1.0.65 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Controller/AuthenticationController.php b/Controller/AuthenticationController.php index b375e582..3aabd5c6 100755 --- a/Controller/AuthenticationController.php +++ b/Controller/AuthenticationController.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.1.0 + * The version of the OpenAPI document: v1.0.65 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Controller/Controller.php b/Controller/Controller.php index f2005920..abff94b6 100755 --- a/Controller/Controller.php +++ b/Controller/Controller.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.1.0 + * The version of the OpenAPI document: v1.0.65 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Controller/MediaLibraryController.php b/Controller/MediaLibraryController.php index 2716ca81..806d9d27 100755 --- a/Controller/MediaLibraryController.php +++ b/Controller/MediaLibraryController.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.1.0 + * The version of the OpenAPI document: v1.0.65 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Controller/NotificationsController.php b/Controller/NotificationsController.php index 857e07eb..9aab11c5 100755 --- a/Controller/NotificationsController.php +++ b/Controller/NotificationsController.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.1.0 + * The version of the OpenAPI document: v1.0.65 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Controller/ProjectsController.php b/Controller/ProjectsController.php index ec1ca741..68042039 100755 --- a/Controller/ProjectsController.php +++ b/Controller/ProjectsController.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.1.0 + * The version of the OpenAPI document: v1.0.65 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Controller/SearchController.php b/Controller/SearchController.php index 7862d508..6a15327c 100755 --- a/Controller/SearchController.php +++ b/Controller/SearchController.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.1.0 + * The version of the OpenAPI document: v1.0.65 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Controller/UserController.php b/Controller/UserController.php index f51d445f..86539f3a 100755 --- a/Controller/UserController.php +++ b/Controller/UserController.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.1.0 + * The version of the OpenAPI document: v1.0.65 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -488,6 +488,88 @@ public function userPutAction(Request $request) } } + /** + * Operation userResetPasswordPost. + * + * Request email to reset password + * + * @param Request $request the Symfony request to handle + * + * @return Response the Symfony response + */ + public function userResetPasswordPostAction(Request $request) + { + // Make sure that the client is providing something that we can consume + $consumes = ['application/json']; + if (!static::isContentTypeAllowed($request, $consumes)) { + // We can't consume the content that the client is sending us + return new Response('', 415); + } + + // Handle authentication + + // Read out all input parameter values into variables + $inline_object = $request->getContent(); + + // Use the default value if no value was provided + + // Deserialize the input values that needs it + try { + $inputFormat = $request->getMimeType($request->getContentType()); + $inline_object = $this->deserialize($inline_object, 'OpenAPI\Server\Model\InlineObject', $inputFormat); + } catch (SerializerRuntimeException $exception) { + return $this->createBadRequestResponse($exception->getMessage()); + } + + // Validate the input values + $asserts = []; + $asserts[] = new Assert\NotNull(); + $asserts[] = new Assert\Type('OpenAPI\\Server\\Model\\InlineObject'); + $asserts[] = new Assert\Valid(); + $response = $this->validate($inline_object, $asserts); + if ($response instanceof Response) { + return $response; + } + + try { + $handler = $this->getApiHandler(); + + // Make the call to the business logic + $responseCode = 204; + $responseHeaders = []; + $result = $handler->userResetPasswordPost($inline_object, $responseCode, $responseHeaders); + + // Find default response message + $message = ''; + + // Find a more specific message, if available + switch ($responseCode) { + case 204: + $message = 'If an account with the provided email exists, an email to reset the password has been send to the user.'; + break; + case 400: + $message = 'Bad request (Invalid, or missing parameters)'; + break; + case 415: + $message = 'Unsupported Media Type - request must use application/json as content type'; + break; + } + + return new Response( + '', + $responseCode, + array_merge( + $responseHeaders, + [ + 'X-OpenAPI-Message' => $message, + ] + ) + ); + } catch (Exception $fallthrough) { + return $this->createErrorResponse(new HttpException(500, 'An unsuspected error occurred.', $fallthrough)); + } + } + /** * Operation usersSearchGet. * diff --git a/Controller/UtilityController.php b/Controller/UtilityController.php index de8f1c56..b70e6ead 100755 --- a/Controller/UtilityController.php +++ b/Controller/UtilityController.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.1.0 + * The version of the OpenAPI document: v1.0.65 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/DependencyInjection/Compiler/OpenAPIServerApiPass.php b/DependencyInjection/Compiler/OpenAPIServerApiPass.php index b87a5f0a..bd8ad084 100755 --- a/DependencyInjection/Compiler/OpenAPIServerApiPass.php +++ b/DependencyInjection/Compiler/OpenAPIServerApiPass.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.1.0 + * The version of the OpenAPI document: v1.0.65 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/DependencyInjection/OpenAPIServerExtension.php b/DependencyInjection/OpenAPIServerExtension.php index eaa5f2d5..9cfc37a7 100755 --- a/DependencyInjection/OpenAPIServerExtension.php +++ b/DependencyInjection/OpenAPIServerExtension.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.1.0 + * The version of the OpenAPI document: v1.0.65 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Model/BaseUser.php b/Model/BaseUser.php index 2bdd6193..d4dbc89d 100755 --- a/Model/BaseUser.php +++ b/Model/BaseUser.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.1.0 + * The version of the OpenAPI document: v1.0.65 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Model/BasicUserDataResponse.php b/Model/BasicUserDataResponse.php index e7549d40..e33455da 100755 --- a/Model/BasicUserDataResponse.php +++ b/Model/BasicUserDataResponse.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.1.0 + * The version of the OpenAPI document: v1.0.65 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Model/DryRun.php b/Model/DryRun.php index d2c6bba2..6951d1e3 100755 --- a/Model/DryRun.php +++ b/Model/DryRun.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.1.0 + * The version of the OpenAPI document: v1.0.65 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Model/ExtendedUserDataResponse.php b/Model/ExtendedUserDataResponse.php index 923351bf..4714956b 100755 --- a/Model/ExtendedUserDataResponse.php +++ b/Model/ExtendedUserDataResponse.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.1.0 + * The version of the OpenAPI document: v1.0.65 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Model/ExtendedUserDataResponseAllOf.php b/Model/ExtendedUserDataResponseAllOf.php index 89016641..17b54427 100755 --- a/Model/ExtendedUserDataResponseAllOf.php +++ b/Model/ExtendedUserDataResponseAllOf.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.1.0 + * The version of the OpenAPI document: v1.0.65 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Model/FeaturedProjectResponse.php b/Model/FeaturedProjectResponse.php index e6ac4c6a..1a8350b3 100755 --- a/Model/FeaturedProjectResponse.php +++ b/Model/FeaturedProjectResponse.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.1.0 + * The version of the OpenAPI document: v1.0.65 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Model/InlineObject.php b/Model/InlineObject.php new file mode 100755 index 00000000..c818d778 --- /dev/null +++ b/Model/InlineObject.php @@ -0,0 +1,84 @@ +email = isset($data['email']) ? $data['email'] : null; + } + + /** + * Gets email. + */ + public function getEmail(): ?string + { + return $this->email; + } + + /** + * Sets email. + * + * @param string|null $email email of the user + * + * @return $this + */ + public function setEmail(string $email = null) + { + $this->email = $email; + + return $this; + } +} diff --git a/Model/JWTResponse.php b/Model/JWTResponse.php index 18dce881..a9811e91 100755 --- a/Model/JWTResponse.php +++ b/Model/JWTResponse.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.1.0 + * The version of the OpenAPI document: v1.0.65 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Model/LoginRequest.php b/Model/LoginRequest.php index 5d9145c8..f2e9222e 100755 --- a/Model/LoginRequest.php +++ b/Model/LoginRequest.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.1.0 + * The version of the OpenAPI document: v1.0.65 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Model/MediaCategoryResponse.php b/Model/MediaCategoryResponse.php index f71725c3..cf859e39 100755 --- a/Model/MediaCategoryResponse.php +++ b/Model/MediaCategoryResponse.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.1.0 + * The version of the OpenAPI document: v1.0.65 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Model/MediaFileResponse.php b/Model/MediaFileResponse.php index 9506b1f7..86808df0 100755 --- a/Model/MediaFileResponse.php +++ b/Model/MediaFileResponse.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.1.0 + * The version of the OpenAPI document: v1.0.65 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Model/MediaPackageResponse.php b/Model/MediaPackageResponse.php index c91d10c8..5fe60fe6 100755 --- a/Model/MediaPackageResponse.php +++ b/Model/MediaPackageResponse.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.1.0 + * The version of the OpenAPI document: v1.0.65 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Model/NotificationContent.php b/Model/NotificationContent.php index c7ebcccd..b68a92c4 100755 --- a/Model/NotificationContent.php +++ b/Model/NotificationContent.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.1.0 + * The version of the OpenAPI document: v1.0.65 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Model/NotificationResponse.php b/Model/NotificationResponse.php index 13d65504..1b1e093e 100755 --- a/Model/NotificationResponse.php +++ b/Model/NotificationResponse.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.1.0 + * The version of the OpenAPI document: v1.0.65 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Model/NotificationsCountResponse.php b/Model/NotificationsCountResponse.php index 34094363..a141a7a2 100755 --- a/Model/NotificationsCountResponse.php +++ b/Model/NotificationsCountResponse.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.1.0 + * The version of the OpenAPI document: v1.0.65 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Model/NotificationsType.php b/Model/NotificationsType.php index 43e3346a..d1577877 100755 --- a/Model/NotificationsType.php +++ b/Model/NotificationsType.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.1.0 + * The version of the OpenAPI document: v1.0.65 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Model/OAuthLoginRequest.php b/Model/OAuthLoginRequest.php index b76bc9ee..8dbd6ae7 100755 --- a/Model/OAuthLoginRequest.php +++ b/Model/OAuthLoginRequest.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.1.0 + * The version of the OpenAPI document: v1.0.65 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Model/ProjectReportRequest.php b/Model/ProjectReportRequest.php index 6bc4b6e0..7bf0c0c7 100755 --- a/Model/ProjectReportRequest.php +++ b/Model/ProjectReportRequest.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.1.0 + * The version of the OpenAPI document: v1.0.65 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Model/ProjectResponse.php b/Model/ProjectResponse.php index 9965b228..0a090859 100755 --- a/Model/ProjectResponse.php +++ b/Model/ProjectResponse.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.1.0 + * The version of the OpenAPI document: v1.0.65 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Model/ProjectsCategory.php b/Model/ProjectsCategory.php index 71eb7fd7..277f9b47 100755 --- a/Model/ProjectsCategory.php +++ b/Model/ProjectsCategory.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.1.0 + * The version of the OpenAPI document: v1.0.65 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Model/RefreshRequest.php b/Model/RefreshRequest.php index 981ad07c..49c57d87 100755 --- a/Model/RefreshRequest.php +++ b/Model/RefreshRequest.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.1.0 + * The version of the OpenAPI document: v1.0.65 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Model/RegisterErrorResponse.php b/Model/RegisterErrorResponse.php index 55742e67..41da7914 100755 --- a/Model/RegisterErrorResponse.php +++ b/Model/RegisterErrorResponse.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.1.0 + * The version of the OpenAPI document: v1.0.65 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Model/RegisterRequest.php b/Model/RegisterRequest.php index de37c1ec..97e72106 100755 --- a/Model/RegisterRequest.php +++ b/Model/RegisterRequest.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.1.0 + * The version of the OpenAPI document: v1.0.65 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Model/SearchResponse.php b/Model/SearchResponse.php index 23649105..dca0143d 100755 --- a/Model/SearchResponse.php +++ b/Model/SearchResponse.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.1.0 + * The version of the OpenAPI document: v1.0.65 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Model/SurveyResponse.php b/Model/SurveyResponse.php index 07963bc7..16577101 100755 --- a/Model/SurveyResponse.php +++ b/Model/SurveyResponse.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.1.0 + * The version of the OpenAPI document: v1.0.65 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Model/UpdateUserErrorResponse.php b/Model/UpdateUserErrorResponse.php index 0ebef1bb..c15fde34 100755 --- a/Model/UpdateUserErrorResponse.php +++ b/Model/UpdateUserErrorResponse.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.1.0 + * The version of the OpenAPI document: v1.0.65 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Model/UpdateUserRequest.php b/Model/UpdateUserRequest.php index 078ed225..551978c4 100755 --- a/Model/UpdateUserRequest.php +++ b/Model/UpdateUserRequest.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.1.0 + * The version of the OpenAPI document: v1.0.65 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Model/UpgradeTokenRequest.php b/Model/UpgradeTokenRequest.php index d334d259..6484b130 100755 --- a/Model/UpgradeTokenRequest.php +++ b/Model/UpgradeTokenRequest.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.1.0 + * The version of the OpenAPI document: v1.0.65 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Model/UploadErrorResponse.php b/Model/UploadErrorResponse.php index fe094860..c0130c4b 100755 --- a/Model/UploadErrorResponse.php +++ b/Model/UploadErrorResponse.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.1.0 + * The version of the OpenAPI document: v1.0.65 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/OpenAPIServerBundle.php b/OpenAPIServerBundle.php index eeb08c05..1b131501 100755 --- a/OpenAPIServerBundle.php +++ b/OpenAPIServerBundle.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.1.0 + * The version of the OpenAPI document: v1.0.65 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/README.md b/README.md index 237239d4..d8b36264 100755 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ API for the Catrobat Share Platform This [Symfony](https://symfony.com/) bundle is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: v1.1.0 +- API version: v1.0.65 - Build package: org.openapitools.codegen.languages.PhpSymfonyServerCodegen For more information, please visit [https://share.catrob.at](https://share.catrob.at) @@ -148,6 +148,7 @@ Class | Method | HTTP request | Description *UserApiInterface* | [**userIdGet**](Resources/docs/Api/UserApiInterface.md#useridget) | **GET** /user/{id} | Get public user data *UserApiInterface* | [**userPost**](Resources/docs/Api/UserApiInterface.md#userpost) | **POST** /user | Register *UserApiInterface* | [**userPut**](Resources/docs/Api/UserApiInterface.md#userput) | **PUT** /user | Update User +*UserApiInterface* | [**userResetPasswordPost**](Resources/docs/Api/UserApiInterface.md#userresetpasswordpost) | **POST** /user/reset-password | Request email to reset password *UserApiInterface* | [**usersSearchGet**](Resources/docs/Api/UserApiInterface.md#userssearchget) | **GET** /users/search | Search for users *UtilityApiInterface* | [**healthGet**](Resources/docs/Api/UtilityApiInterface.md#healthget) | **GET** /health | Health Check *UtilityApiInterface* | [**surveyLangCodeGet**](Resources/docs/Api/UtilityApiInterface.md#surveylangcodeget) | **GET** /survey/{lang_code} | Get survey link for given language code. @@ -161,6 +162,7 @@ Class | Method | HTTP request | Description - [ExtendedUserDataResponse](Resources/docs/Model/ExtendedUserDataResponse.md) - [ExtendedUserDataResponseAllOf](Resources/docs/Model/ExtendedUserDataResponseAllOf.md) - [FeaturedProjectResponse](Resources/docs/Model/FeaturedProjectResponse.md) + - [InlineObject](Resources/docs/Model/InlineObject.md) - [JWTResponse](Resources/docs/Model/JWTResponse.md) - [LoginRequest](Resources/docs/Model/LoginRequest.md) - [MediaCategoryResponse](Resources/docs/Model/MediaCategoryResponse.md) diff --git a/Resources/config/routing.yml b/Resources/config/routing.yml index f298128b..974d4dd4 100755 --- a/Resources/config/routing.yml +++ b/Resources/config/routing.yml @@ -212,6 +212,12 @@ open_api_server_user_userput: defaults: _controller: open_api_server.controller.user:userPutAction +open_api_server_user_userresetpasswordpost: + path: /user/reset-password + methods: [POST] + defaults: + _controller: open_api_server.controller.user:userResetPasswordPostAction + open_api_server_user_userssearchget: path: /users/search methods: [GET] diff --git a/Resources/docs/Api/UserApiInterface.md b/Resources/docs/Api/UserApiInterface.md index 2c306bb0..2b8d0778 100755 --- a/Resources/docs/Api/UserApiInterface.md +++ b/Resources/docs/Api/UserApiInterface.md @@ -9,6 +9,7 @@ Method | HTTP request | Description [**userIdGet**](UserApiInterface.md#userIdGet) | **GET** /user/{id} | Get public user data [**userPost**](UserApiInterface.md#userPost) | **POST** /user | Register [**userPut**](UserApiInterface.md#userPut) | **PUT** /user | Update User +[**userResetPasswordPost**](UserApiInterface.md#userResetPasswordPost) | **POST** /user/reset-password | Request email to reset password [**usersSearchGet**](UserApiInterface.md#usersSearchGet) | **GET** /users/search | Search for users @@ -290,6 +291,60 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) +## **userResetPasswordPost** +> userResetPasswordPost($inline_object) + +Request email to reset password + +If an account with the provided email exists, an email to reset the password will be sent to the user. The email contains a link to reset the password. Note: This link is only valid for a limited amount of time. + +### Example Implementation +```php + OpenAPI\Server\Model\BasicUserDataResponse usersSearchGet($query, $limit, $offset) diff --git a/Resources/docs/Model/InlineObject.md b/Resources/docs/Model/InlineObject.md new file mode 100755 index 00000000..15331e2d --- /dev/null +++ b/Resources/docs/Model/InlineObject.md @@ -0,0 +1,10 @@ +# InlineObject + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **string** | Email of the user. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/Service/JmsSerializer.php b/Service/JmsSerializer.php index 0d1bf95f..312a865a 100755 --- a/Service/JmsSerializer.php +++ b/Service/JmsSerializer.php @@ -3,68 +3,67 @@ namespace OpenAPI\Server\Service; use JMS\Serializer\Naming\CamelCaseNamingStrategy; -use JMS\Serializer\Serializer; +use JMS\Serializer\Naming\SerializedNameAnnotationStrategy; use JMS\Serializer\SerializerBuilder; -use JMS\Serializer\Visitor\Factory\JsonDeserializationVisitorFactory; -use JMS\Serializer\Visitor\Factory\XmlDeserializationVisitorFactory; +use JMS\Serializer\XmlDeserializationVisitor; class JmsSerializer implements SerializerInterface { - protected Serializer $serializer; - - public function __construct() - { - $this->serializer = SerializerBuilder::create() - ->setPropertyNamingStrategy(new CamelCaseNamingStrategy()) - ->setDeserializationVisitor('json', new JsonDeserializationVisitorFactory()) - ->setDeserializationVisitor('xml', new XmlDeserializationVisitorFactory()) - ->build() - ; + protected $serializer; + + public function __construct() + { + $naming_strategy = new SerializedNameAnnotationStrategy(new CamelCaseNamingStrategy()); + $this->serializer = SerializerBuilder::create() + ->setDeserializationVisitor('json', new StrictJsonDeserializationVisitor($naming_strategy)) + ->setDeserializationVisitor('xml', new XmlDeserializationVisitor($naming_strategy)) + ->build() + ; + } + + public function serialize($data, $format) + { + return SerializerBuilder::create()->build()->serialize($data, $this->convertFormat($format)); + } + + public function deserialize($data, $type, $format) + { + if ('string' == $format) { + return $this->deserializeString($data, $type); } - public function serialize($data, $format): string - { - return SerializerBuilder::create()->build()->serialize($data, $this->convertFormat($format)); - } - - public function deserialize($data, $type, $format) - { - if ('string' == $format) { - return $this->deserializeString($data, $type); - } + // If we end up here, let JMS serializer handle the deserialization + return $this->serializer->deserialize($data, $type, $this->convertFormat($format)); + } - // If we end up here, let JMS serializer handle the deserialization - return $this->serializer->deserialize($data, $type, $this->convertFormat($format)); - } - - private function convertFormat($format): ?string - { - switch ($format) { + private function convertFormat($format) + { + switch ($format) { case 'application/json': return 'json'; case 'application/xml': return 'xml'; } - return null; - } + return null; + } - private function deserializeString($data, $type) - { - // Figure out if we have an array format - if (1 === preg_match('/array<(csv|ssv|tsv|pipes),(int|string)>/i', $type, $matches)) { - return $this->deserializeArrayString($matches[1], $matches[2], $data); - } + private function deserializeString($data, $type) + { + // Figure out if we have an array format + if (1 === preg_match('/array<(csv|ssv|tsv|pipes),(int|string)>/i', $type, $matches)) { + return $this->deserializeArrayString($matches[1], $matches[2], $data); + } - switch ($type) { + switch ($type) { case 'int': case 'integer': if (is_int($data)) { - return $data; + return $data; } if (is_numeric($data)) { - return $data + 0; + return $data + 0; } break; @@ -73,24 +72,24 @@ private function deserializeString($data, $type) case 'boolean': case 'bool': if ('true' === strtolower($data)) { - return true; + return true; } if ('false' === strtolower($data)) { - return false; + return false; } break; } - // If we end up here, just return data - return $data; - } + // If we end up here, just return data + return $data; + } - private function deserializeArrayString($format, $type, $data) - { - // Parse the string using the correct separator - switch ($format) { + private function deserializeArrayString($format, $type, $data) + { + // Parse the string using the correct separator + switch ($format) { case 'csv': $data = explode(',', $data); break; @@ -107,11 +106,11 @@ private function deserializeArrayString($format, $type, $data) $data = []; } - // Deserialize each of the array elements - foreach ($data as $key => $item) { - $data[$key] = $this->deserializeString($item, $type); - } - - return $data; + // Deserialize each of the array elements + foreach ($data as $key => $item) { + $data[$key] = $this->deserializeString($item, $type); } + + return $data; + } } diff --git a/Service/StrictJsonDeserializationVisitor.php b/Service/StrictJsonDeserializationVisitor.php new file mode 100755 index 00000000..bb05fe72 --- /dev/null +++ b/Service/StrictJsonDeserializationVisitor.php @@ -0,0 +1,72 @@ +