diff --git a/dev/io.openliberty.microprofile.openapi.4.0.internal_fat/.classpath b/dev/io.openliberty.microprofile.openapi.4.0.internal_fat/.classpath new file mode 100644 index 000000000000..61e710c1a5e5 --- /dev/null +++ b/dev/io.openliberty.microprofile.openapi.4.0.internal_fat/.classpath @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/dev/io.openliberty.microprofile.openapi.4.0.internal_fat/.project b/dev/io.openliberty.microprofile.openapi.4.0.internal_fat/.project new file mode 100644 index 000000000000..926477e610ba --- /dev/null +++ b/dev/io.openliberty.microprofile.openapi.4.0.internal_fat/.project @@ -0,0 +1,23 @@ + + + io.openliberty.microprofile.openapi.4.0.internal_fat + + + + + + org.eclipse.jdt.core.javabuilder + + + + + bndtools.core.bndbuilder + + + + + + org.eclipse.jdt.core.javanature + bndtools.core.bndnature + + diff --git a/dev/io.openliberty.microprofile.openapi.4.0.internal_fat/.settings/bndtools.core.prefs b/dev/io.openliberty.microprofile.openapi.4.0.internal_fat/.settings/bndtools.core.prefs new file mode 100644 index 000000000000..789fa99991ac --- /dev/null +++ b/dev/io.openliberty.microprofile.openapi.4.0.internal_fat/.settings/bndtools.core.prefs @@ -0,0 +1,2 @@ +compileErrorAction=build +eclipse.preferences.version=1 diff --git a/dev/io.openliberty.microprofile.openapi.4.0.internal_fat/.settings/org.eclipse.core.resources.prefs b/dev/io.openliberty.microprofile.openapi.4.0.internal_fat/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 000000000000..1554c6f848a1 --- /dev/null +++ b/dev/io.openliberty.microprofile.openapi.4.0.internal_fat/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/bnd.bnd=UTF-8 diff --git a/dev/io.openliberty.microprofile.openapi.4.0.internal_fat/.settings/org.eclipse.jdt.core.prefs b/dev/io.openliberty.microprofile.openapi.4.0.internal_fat/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 000000000000..0a9789f208d5 --- /dev/null +++ b/dev/io.openliberty.microprofile.openapi.4.0.internal_fat/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,412 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=11 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.release=disabled +org.eclipse.jdt.core.compiler.source=11 +org.eclipse.jdt.core.formatter.align_arrows_in_switch_on_columns=false +org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false +org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647 +org.eclipse.jdt.core.formatter.align_selector_in_method_invocation_on_expression_first_line=false +org.eclipse.jdt.core.formatter.align_type_members_on_columns=false +org.eclipse.jdt.core.formatter.align_variable_declarations_on_columns=false +org.eclipse.jdt.core.formatter.align_with_spaces=false +org.eclipse.jdt.core.formatter.alignment_for_additive_operator=18 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_enum_constant=49 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_field=49 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_local_variable=49 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_method=49 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_package=49 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_parameter=0 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_type=49 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=18 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=18 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=2 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=18 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=18 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=18 +org.eclipse.jdt.core.formatter.alignment_for_assertion_message=0 +org.eclipse.jdt.core.formatter.alignment_for_assignment=0 +org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=18 +org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 +org.eclipse.jdt.core.formatter.alignment_for_compact_loops=16 +org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=0 +org.eclipse.jdt.core.formatter.alignment_for_conditional_expression_chain=0 +org.eclipse.jdt.core.formatter.alignment_for_enum_constants=16 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=18 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_for_loop_header=0 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_switch_case_with_arrow=0 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_switch_case_with_colon=0 +org.eclipse.jdt.core.formatter.alignment_for_logical_operator=18 +org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 +org.eclipse.jdt.core.formatter.alignment_for_module_statements=16 +org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 +org.eclipse.jdt.core.formatter.alignment_for_multiplicative_operator=18 +org.eclipse.jdt.core.formatter.alignment_for_parameterized_type_references=0 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=18 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=18 +org.eclipse.jdt.core.formatter.alignment_for_permitted_types_in_type_declaration=0 +org.eclipse.jdt.core.formatter.alignment_for_record_components=18 +org.eclipse.jdt.core.formatter.alignment_for_relational_operator=0 +org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80 +org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=18 +org.eclipse.jdt.core.formatter.alignment_for_shift_operator=0 +org.eclipse.jdt.core.formatter.alignment_for_string_concatenation=18 +org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=0 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=20 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_record_declaration=0 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=0 +org.eclipse.jdt.core.formatter.alignment_for_switch_case_with_arrow=0 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=4 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=0 +org.eclipse.jdt.core.formatter.alignment_for_type_annotations=0 +org.eclipse.jdt.core.formatter.alignment_for_type_arguments=0 +org.eclipse.jdt.core.formatter.alignment_for_type_parameters=0 +org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16 +org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_after_last_class_body_declaration=0 +org.eclipse.jdt.core.formatter.blank_lines_after_package=1 +org.eclipse.jdt.core.formatter.blank_lines_before_abstract_method=1 +org.eclipse.jdt.core.formatter.blank_lines_before_field=0 +org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 +org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1 +org.eclipse.jdt.core.formatter.blank_lines_before_method=1 +org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 +org.eclipse.jdt.core.formatter.blank_lines_before_package=0 +org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 +org.eclipse.jdt.core.formatter.blank_lines_between_statement_group_in_switch=0 +org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 +org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block_in_case_after_arrow=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_record_constructor=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_record_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.comment.align_tags_descriptions_grouped=false +org.eclipse.jdt.core.formatter.comment.align_tags_names_descriptions=false +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false +org.eclipse.jdt.core.formatter.comment.count_line_length_from_starting_position=false +org.eclipse.jdt.core.formatter.comment.format_block_comments=true +org.eclipse.jdt.core.formatter.comment.format_header=false +org.eclipse.jdt.core.formatter.comment.format_html=false +org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true +org.eclipse.jdt.core.formatter.comment.format_line_comments=false +org.eclipse.jdt.core.formatter.comment.format_source_code=true +org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true +org.eclipse.jdt.core.formatter.comment.indent_root_tags=false +org.eclipse.jdt.core.formatter.comment.indent_tag_description=false +org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert +org.eclipse.jdt.core.formatter.comment.insert_new_line_between_different_tags=do not insert +org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert +org.eclipse.jdt.core.formatter.comment.javadoc_do_not_separate_block_tags=false +org.eclipse.jdt.core.formatter.comment.line_length=180 +org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true +org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true +org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false +org.eclipse.jdt.core.formatter.compact_else_if=true +org.eclipse.jdt.core.formatter.continuation_indentation=4 +org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=4 +org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off +org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on +org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false +org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=false +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_record_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true +org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_empty_lines=false +org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true +org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true +org.eclipse.jdt.core.formatter.indentation.size=8 +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_additive_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_case=insert +org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_default=insert +org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_permitted_types=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_record_components=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_switch_case_expressions=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert +org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert +org.eclipse.jdt.core.formatter.insert_space_after_logical_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_multiplicative_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_not_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_record_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_relational_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert +org.eclipse.jdt.core.formatter.insert_space_after_shift_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_string_concatenation=insert +org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_additive_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_case=insert +org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_default=insert +org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_record_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_permitted_types=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_record_components=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_switch_case_expressions=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert +org.eclipse.jdt.core.formatter.insert_space_before_logical_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_multiplicative_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_record_constructor=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_record_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_record_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert +org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_relational_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_shift_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_string_concatenation=insert +org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.join_line_comments=false +org.eclipse.jdt.core.formatter.join_lines_in_comments=false +org.eclipse.jdt.core.formatter.join_wrapped_lines=false +org.eclipse.jdt.core.formatter.keep_annotation_declaration_on_one_line=one_line_if_empty +org.eclipse.jdt.core.formatter.keep_anonymous_type_declaration_on_one_line=one_line_if_empty +org.eclipse.jdt.core.formatter.keep_code_block_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false +org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false +org.eclipse.jdt.core.formatter.keep_enum_constant_declaration_on_one_line=one_line_if_empty +org.eclipse.jdt.core.formatter.keep_enum_declaration_on_one_line=one_line_if_empty +org.eclipse.jdt.core.formatter.keep_if_then_body_block_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false +org.eclipse.jdt.core.formatter.keep_lambda_body_block_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_loop_body_block_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_method_body_on_one_line=one_line_if_empty +org.eclipse.jdt.core.formatter.keep_record_constructor_on_one_line=one_line_if_empty +org.eclipse.jdt.core.formatter.keep_record_declaration_on_one_line=one_line_if_empty +org.eclipse.jdt.core.formatter.keep_simple_do_while_body_on_same_line=false +org.eclipse.jdt.core.formatter.keep_simple_for_body_on_same_line=false +org.eclipse.jdt.core.formatter.keep_simple_getter_setter_on_one_line=false +org.eclipse.jdt.core.formatter.keep_simple_while_body_on_same_line=false +org.eclipse.jdt.core.formatter.keep_switch_body_block_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_switch_case_with_arrow_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false +org.eclipse.jdt.core.formatter.keep_type_declaration_on_one_line=one_line_if_empty +org.eclipse.jdt.core.formatter.lineSplit=180 +org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=true +org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=true +org.eclipse.jdt.core.formatter.number_of_blank_lines_after_code_block=0 +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_code_block=0 +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_end_of_code_block=0 +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_end_of_method_body=0 +org.eclipse.jdt.core.formatter.number_of_blank_lines_before_code_block=0 +org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1 +org.eclipse.jdt.core.formatter.parentheses_positions_in_annotation=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_catch_clause=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_enum_constant_declaration=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_for_statment=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_if_while_statement=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_lambda_declaration=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_method_delcaration=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_method_invocation=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_record_declaration=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_switch_statement=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_try_clause=common_lines +org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false +org.eclipse.jdt.core.formatter.tabulation.char=space +org.eclipse.jdt.core.formatter.tabulation.size=4 +org.eclipse.jdt.core.formatter.text_block_indentation=0 +org.eclipse.jdt.core.formatter.use_on_off_tags=false +org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false +org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true +org.eclipse.jdt.core.formatter.wrap_before_assertion_message_operator=true +org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false +org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true +org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true +org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true +org.eclipse.jdt.core.formatter.wrap_before_multiplicative_operator=true +org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true +org.eclipse.jdt.core.formatter.wrap_before_relational_operator=true +org.eclipse.jdt.core.formatter.wrap_before_shift_operator=true +org.eclipse.jdt.core.formatter.wrap_before_string_concatenation=true +org.eclipse.jdt.core.formatter.wrap_before_switch_case_arrow_operator=false +org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true +org.eclipse.jdt.core.javaFormatter=org.eclipse.jdt.core.defaultJavaFormatter diff --git a/dev/io.openliberty.microprofile.openapi.4.0.internal_fat/.settings/org.eclipse.jdt.ui.prefs b/dev/io.openliberty.microprofile.openapi.4.0.internal_fat/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 000000000000..2d7a2b772176 --- /dev/null +++ b/dev/io.openliberty.microprofile.openapi.4.0.internal_fat/.settings/org.eclipse.jdt.ui.prefs @@ -0,0 +1,287 @@ +cleanup.add_all=false +cleanup.add_default_serial_version_id=true +cleanup.add_generated_serial_version_id=false +cleanup.add_missing_annotations=true +cleanup.add_missing_deprecated_annotations=true +cleanup.add_missing_methods=false +cleanup.add_missing_nls_tags=false +cleanup.add_missing_override_annotations=true +cleanup.add_missing_override_annotations_interface_methods=true +cleanup.add_serial_version_id=false +cleanup.always_use_blocks=true +cleanup.always_use_parentheses_in_expressions=false +cleanup.always_use_this_for_non_static_field_access=false +cleanup.always_use_this_for_non_static_method_access=false +cleanup.array_with_curly=false +cleanup.arrays_fill=false +cleanup.bitwise_conditional_expression=false +cleanup.boolean_literal=false +cleanup.boolean_value_rather_than_comparison=true +cleanup.break_loop=false +cleanup.collection_cloning=false +cleanup.comparing_on_criteria=false +cleanup.comparison_statement=false +cleanup.controlflow_merge=false +cleanup.convert_functional_interfaces=true +cleanup.convert_to_enhanced_for_loop=false +cleanup.convert_to_enhanced_for_loop_if_loop_var_used=false +cleanup.convert_to_switch_expressions=false +cleanup.correct_indentation=true +cleanup.do_while_rather_than_while=true +cleanup.double_negation=false +cleanup.else_if=false +cleanup.embedded_if=false +cleanup.evaluate_nullable=false +cleanup.extract_increment=false +cleanup.format_source_code=true +cleanup.format_source_code_changes_only=false +cleanup.hash=false +cleanup.if_condition=false +cleanup.insert_inferred_type_arguments=false +cleanup.instanceof=false +cleanup.instanceof_keyword=false +cleanup.invert_equals=false +cleanup.join=false +cleanup.lazy_logical_operator=false +cleanup.make_local_variable_final=true +cleanup.make_parameters_final=false +cleanup.make_private_fields_final=true +cleanup.make_type_abstract_if_missing_method=false +cleanup.make_variable_declarations_final=false +cleanup.map_cloning=false +cleanup.merge_conditional_blocks=false +cleanup.multi_catch=false +cleanup.never_use_blocks=false +cleanup.never_use_parentheses_in_expressions=true +cleanup.no_string_creation=false +cleanup.no_super=false +cleanup.number_suffix=false +cleanup.objects_equals=false +cleanup.one_if_rather_than_duplicate_blocks_that_fall_through=false +cleanup.operand_factorization=false +cleanup.organize_imports=true +cleanup.overridden_assignment=false +cleanup.plain_replacement=false +cleanup.precompile_regex=false +cleanup.primitive_comparison=false +cleanup.primitive_parsing=false +cleanup.primitive_rather_than_wrapper=true +cleanup.primitive_serialization=false +cleanup.pull_out_if_from_if_else=false +cleanup.pull_up_assignment=false +cleanup.push_down_negation=false +cleanup.qualify_static_field_accesses_with_declaring_class=false +cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +cleanup.qualify_static_member_accesses_with_declaring_class=true +cleanup.qualify_static_method_accesses_with_declaring_class=false +cleanup.reduce_indentation=false +cleanup.redundant_comparator=false +cleanup.redundant_falling_through_block_end=false +cleanup.remove_private_constructors=true +cleanup.remove_redundant_modifiers=false +cleanup.remove_redundant_semicolons=false +cleanup.remove_redundant_type_arguments=true +cleanup.remove_trailing_whitespaces=true +cleanup.remove_trailing_whitespaces_all=true +cleanup.remove_trailing_whitespaces_ignore_empty=false +cleanup.remove_unnecessary_array_creation=false +cleanup.remove_unnecessary_casts=true +cleanup.remove_unnecessary_nls_tags=true +cleanup.remove_unused_imports=true +cleanup.remove_unused_local_variables=false +cleanup.remove_unused_private_fields=true +cleanup.remove_unused_private_members=false +cleanup.remove_unused_private_methods=true +cleanup.remove_unused_private_types=true +cleanup.return_expression=false +cleanup.simplify_lambda_expression_and_method_ref=false +cleanup.single_used_field=false +cleanup.sort_members=false +cleanup.sort_members_all=false +cleanup.standard_comparison=false +cleanup.static_inner_class=false +cleanup.strictly_equal_or_different=false +cleanup.stringbuffer_to_stringbuilder=false +cleanup.stringbuilder=false +cleanup.stringbuilder_for_local_vars=true +cleanup.stringconcat_to_textblock=false +cleanup.substring=false +cleanup.switch=false +cleanup.system_property=false +cleanup.system_property_boolean=false +cleanup.system_property_file_encoding=false +cleanup.system_property_file_separator=false +cleanup.system_property_line_separator=false +cleanup.system_property_path_separator=false +cleanup.ternary_operator=false +cleanup.try_with_resource=false +cleanup.unlooped_while=false +cleanup.unreachable_block=false +cleanup.use_anonymous_class_creation=false +cleanup.use_autoboxing=false +cleanup.use_blocks=false +cleanup.use_blocks_only_for_return_and_throw=false +cleanup.use_directly_map_method=false +cleanup.use_lambda=true +cleanup.use_parentheses_in_expressions=false +cleanup.use_string_is_blank=false +cleanup.use_this_for_non_static_field_access=false +cleanup.use_this_for_non_static_field_access_only_if_necessary=true +cleanup.use_this_for_non_static_method_access=false +cleanup.use_this_for_non_static_method_access_only_if_necessary=true +cleanup.use_unboxing=false +cleanup.use_var=false +cleanup.useless_continue=false +cleanup.useless_return=false +cleanup.valueof_rather_than_instantiation=false +cleanup_profile=_OL basic +cleanup_settings_version=2 +eclipse.preferences.version=1 +editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true +formatter_profile=_OL Standard +formatter_settings_version=23 +org.eclipse.jdt.ui.ignorelowercasenames=true +org.eclipse.jdt.ui.importorder=java;javax;org;com; +org.eclipse.jdt.ui.javadoc=true +org.eclipse.jdt.ui.ondemandthreshold=99 +org.eclipse.jdt.ui.staticondemandthreshold=99 +org.eclipse.jdt.ui.text.custom_code_templates= +sp_cleanup.add_all=false +sp_cleanup.add_default_serial_version_id=true +sp_cleanup.add_generated_serial_version_id=false +sp_cleanup.add_missing_annotations=true +sp_cleanup.add_missing_deprecated_annotations=true +sp_cleanup.add_missing_methods=false +sp_cleanup.add_missing_nls_tags=false +sp_cleanup.add_missing_override_annotations=true +sp_cleanup.add_missing_override_annotations_interface_methods=true +sp_cleanup.add_serial_version_id=false +sp_cleanup.always_use_blocks=true +sp_cleanup.always_use_parentheses_in_expressions=false +sp_cleanup.always_use_this_for_non_static_field_access=false +sp_cleanup.always_use_this_for_non_static_method_access=false +sp_cleanup.array_with_curly=false +sp_cleanup.arrays_fill=false +sp_cleanup.bitwise_conditional_expression=false +sp_cleanup.boolean_literal=false +sp_cleanup.boolean_value_rather_than_comparison=false +sp_cleanup.break_loop=false +sp_cleanup.collection_cloning=false +sp_cleanup.comparing_on_criteria=false +sp_cleanup.comparison_statement=false +sp_cleanup.controlflow_merge=false +sp_cleanup.convert_functional_interfaces=false +sp_cleanup.convert_to_enhanced_for_loop=false +sp_cleanup.convert_to_enhanced_for_loop_if_loop_var_used=false +sp_cleanup.convert_to_switch_expressions=false +sp_cleanup.correct_indentation=true +sp_cleanup.do_while_rather_than_while=false +sp_cleanup.double_negation=false +sp_cleanup.else_if=false +sp_cleanup.embedded_if=false +sp_cleanup.evaluate_nullable=false +sp_cleanup.extract_increment=false +sp_cleanup.format_source_code=true +sp_cleanup.format_source_code_changes_only=false +sp_cleanup.hash=false +sp_cleanup.if_condition=false +sp_cleanup.insert_inferred_type_arguments=false +sp_cleanup.instanceof=false +sp_cleanup.instanceof_keyword=false +sp_cleanup.invert_equals=false +sp_cleanup.join=false +sp_cleanup.lazy_logical_operator=false +sp_cleanup.make_local_variable_final=true +sp_cleanup.make_parameters_final=false +sp_cleanup.make_private_fields_final=true +sp_cleanup.make_type_abstract_if_missing_method=false +sp_cleanup.make_variable_declarations_final=false +sp_cleanup.map_cloning=false +sp_cleanup.merge_conditional_blocks=false +sp_cleanup.multi_catch=false +sp_cleanup.never_use_blocks=false +sp_cleanup.never_use_parentheses_in_expressions=true +sp_cleanup.no_string_creation=false +sp_cleanup.no_super=false +sp_cleanup.number_suffix=false +sp_cleanup.objects_equals=false +sp_cleanup.on_save_use_additional_actions=true +sp_cleanup.one_if_rather_than_duplicate_blocks_that_fall_through=false +sp_cleanup.operand_factorization=false +sp_cleanup.organize_imports=true +sp_cleanup.overridden_assignment=false +sp_cleanup.plain_replacement=false +sp_cleanup.precompile_regex=false +sp_cleanup.primitive_comparison=false +sp_cleanup.primitive_parsing=false +sp_cleanup.primitive_rather_than_wrapper=false +sp_cleanup.primitive_serialization=false +sp_cleanup.pull_out_if_from_if_else=false +sp_cleanup.pull_up_assignment=false +sp_cleanup.push_down_negation=false +sp_cleanup.qualify_static_field_accesses_with_declaring_class=false +sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +sp_cleanup.qualify_static_member_accesses_with_declaring_class=false +sp_cleanup.qualify_static_method_accesses_with_declaring_class=false +sp_cleanup.reduce_indentation=false +sp_cleanup.redundant_comparator=false +sp_cleanup.redundant_falling_through_block_end=false +sp_cleanup.remove_private_constructors=true +sp_cleanup.remove_redundant_modifiers=false +sp_cleanup.remove_redundant_semicolons=false +sp_cleanup.remove_redundant_type_arguments=true +sp_cleanup.remove_trailing_whitespaces=true +sp_cleanup.remove_trailing_whitespaces_all=true +sp_cleanup.remove_trailing_whitespaces_ignore_empty=false +sp_cleanup.remove_unnecessary_array_creation=false +sp_cleanup.remove_unnecessary_casts=true +sp_cleanup.remove_unnecessary_nls_tags=true +sp_cleanup.remove_unused_imports=false +sp_cleanup.remove_unused_local_variables=false +sp_cleanup.remove_unused_private_fields=true +sp_cleanup.remove_unused_private_members=false +sp_cleanup.remove_unused_private_methods=true +sp_cleanup.remove_unused_private_types=true +sp_cleanup.return_expression=false +sp_cleanup.simplify_lambda_expression_and_method_ref=false +sp_cleanup.single_used_field=false +sp_cleanup.sort_members=false +sp_cleanup.sort_members_all=false +sp_cleanup.standard_comparison=false +sp_cleanup.static_inner_class=false +sp_cleanup.strictly_equal_or_different=false +sp_cleanup.stringbuffer_to_stringbuilder=false +sp_cleanup.stringbuilder=false +sp_cleanup.stringbuilder_for_local_vars=true +sp_cleanup.stringconcat_to_textblock=false +sp_cleanup.substring=false +sp_cleanup.switch=false +sp_cleanup.system_property=false +sp_cleanup.system_property_boolean=false +sp_cleanup.system_property_file_encoding=false +sp_cleanup.system_property_file_separator=false +sp_cleanup.system_property_line_separator=false +sp_cleanup.system_property_path_separator=false +sp_cleanup.ternary_operator=false +sp_cleanup.try_with_resource=false +sp_cleanup.unlooped_while=false +sp_cleanup.unreachable_block=false +sp_cleanup.use_anonymous_class_creation=false +sp_cleanup.use_autoboxing=false +sp_cleanup.use_blocks=false +sp_cleanup.use_blocks_only_for_return_and_throw=false +sp_cleanup.use_directly_map_method=false +sp_cleanup.use_lambda=true +sp_cleanup.use_parentheses_in_expressions=false +sp_cleanup.use_string_is_blank=false +sp_cleanup.use_this_for_non_static_field_access=false +sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true +sp_cleanup.use_this_for_non_static_method_access=false +sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true +sp_cleanup.use_unboxing=false +sp_cleanup.use_var=false +sp_cleanup.useless_continue=false +sp_cleanup.useless_return=false +sp_cleanup.valueof_rather_than_instantiation=false diff --git a/dev/io.openliberty.microprofile.openapi.4.0.internal_fat/bnd.bnd b/dev/io.openliberty.microprofile.openapi.4.0.internal_fat/bnd.bnd new file mode 100644 index 000000000000..787effbfbc10 --- /dev/null +++ b/dev/io.openliberty.microprofile.openapi.4.0.internal_fat/bnd.bnd @@ -0,0 +1,20 @@ +#******************************************************************************* +# Copyright (c) 2020, 2022 IBM Corporation and others. +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License 2.0 +# which accompanies this distribution, and is available at +# http://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# +# Contributors: +# IBM Corporation - initial API and implementation +#******************************************************************************* +-include= ~../cnf/resources/bnd/bundle.props +bVersion=1.0 + + +src: \ + fat/src + +fat.project: true diff --git a/dev/io.openliberty.microprofile.openapi.4.0.internal_fat/fat/src/io/openliberty/microprofile/openapi40/fat/FATSuite.java b/dev/io.openliberty.microprofile.openapi.4.0.internal_fat/fat/src/io/openliberty/microprofile/openapi40/fat/FATSuite.java new file mode 100644 index 000000000000..0b9a5ea433dc --- /dev/null +++ b/dev/io.openliberty.microprofile.openapi.4.0.internal_fat/fat/src/io/openliberty/microprofile/openapi40/fat/FATSuite.java @@ -0,0 +1,32 @@ +/******************************************************************************* + * Copyright (c) 2024 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ +package io.openliberty.microprofile.openapi40.fat; + +import org.junit.runner.RunWith; +import org.junit.runners.Suite; +import org.junit.runners.Suite.SuiteClasses; + +import io.openliberty.microprofile.openapi40.fat.validation.ValidationTestFive; +import io.openliberty.microprofile.openapi40.fat.validation.ValidationTestFour; +import io.openliberty.microprofile.openapi40.fat.validation.ValidationTestMissing; +import io.openliberty.microprofile.openapi40.fat.validation.ValidationTestNoErrors; +import io.openliberty.microprofile.openapi40.fat.validation.ValidationTestOne; +import io.openliberty.microprofile.openapi40.fat.validation.ValidationTestTwo; + +@SuiteClasses({ + ValidationTestOne.class, + ValidationTestTwo.class, + ValidationTestMissing.class, + ValidationTestFour.class, + ValidationTestFive.class, + ValidationTestNoErrors.class +}) +@RunWith(Suite.class) +public class FATSuite {} diff --git a/dev/io.openliberty.microprofile.openapi.4.0.internal_fat/fat/src/io/openliberty/microprofile/openapi40/fat/validation/ValidationTestFive.java b/dev/io.openliberty.microprofile.openapi.4.0.internal_fat/fat/src/io/openliberty/microprofile/openapi40/fat/validation/ValidationTestFive.java new file mode 100644 index 000000000000..d6f7b8bdd49e --- /dev/null +++ b/dev/io.openliberty.microprofile.openapi.4.0.internal_fat/fat/src/io/openliberty/microprofile/openapi40/fat/validation/ValidationTestFive.java @@ -0,0 +1,89 @@ +/******************************************************************************* + * Copyright (c) 2024 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ +package io.openliberty.microprofile.openapi40.fat.validation; + +import static com.ibm.websphere.simplicity.ShrinkHelper.DeployOptions.SERVER_ONLY; +import static io.openliberty.microprofile.openapi40.fat.validation.ValidationTestUtils.assertMessage; +import static io.openliberty.microprofile.openapi40.fat.validation.ValidationTestUtils.assertNoMessage; + +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.AfterClass; +import org.junit.BeforeClass; +import org.junit.Test; +import org.junit.runner.RunWith; + +import com.ibm.websphere.simplicity.ShrinkHelper; + +import componenttest.annotation.Server; +import componenttest.custom.junit.runner.FATRunner; +import componenttest.topology.impl.LibertyServer; + +/** + * Validation tests for Tags, Discriminator, Schema and Extension + *

+ * Ported from OpenAPIValidationTestFive and converted to run on OpenAPI v3.1 + *

+ * The validation tests for Schema in particular are quite different for OpenAPI 3.1 + */ +@RunWith(FATRunner.class) +public class ValidationTestFive { + private static final String SERVER_NAME = "OpenAPIValidationServer"; + + @Server(SERVER_NAME) + public static LibertyServer server; + + @BeforeClass + public static void setup() throws Exception { + WebArchive war = ShrinkWrap.create(WebArchive.class, "validation5.war") + .addAsManifestResource(ValidationTestFive.class.getPackage(), "validation5.yml", "openapi.yml"); + ShrinkHelper.exportDropinAppToServer(server, war, SERVER_ONLY); + + server.startServer(); + } + + @AfterClass + public static void shutdown() throws Exception { + server.stopServer("CWWKO1650E", // Validation errors found + "CWWKO1651W");// Validation warnings found + } + + @Test + public void testTags() throws Exception { + assertMessage(server, "- Message: Required \"name\" field is missing or is set to an invalid value, Location: #/tags"); + } + + @Test + public void testDiscriminator() throws Exception { + assertMessage(server, "- Message: Required \"propertyName\" field is missing or is set to an invalid value,*"); + } + + @Test + public void testSchema() throws Exception { + assertMessage(server, " - Message: The Schema Object must have the \"multipleOf\" property set to a number strictly greater than zero, " + + "Location: #/paths/~1availability/get/parameters/schema"); + assertMessage(server, " - Message: The \"minItems\" property of the Schema Object must be greater than or equal to zero, " + + "Location: #/paths/~1availability/get/parameters/schema"); + assertMessage(server, " - Message: The \"maxItems\" property of the Schema Object must be greater than or equal to zero, " + + "Location: #/paths/~1availability/get/parameters/schema"); + assertMessage(server, " - Message: The \"minProperties\" property of the Schema Object must be greater than or equal to zero, " + + "Location: #/paths/~1availability/get/parameters/schema"); + assertMessage(server, " - Message: The \"maxProperties\" property of the Schema Object must be greater than or equal to zero, " + + "Location: #/paths/~1availability/get/parameters/schema"); + + // Warnings not currently emitted for 3.1 + assertNoMessage(server, " - Message: The \"minItems\" property is not appropriate for the Schema Object of \"object\" type"); + assertNoMessage(server, " - Message: The \"maxItems\" property is not appropriate for the Schema Object of \"object\" type"); + + // Dubious error reported for 3.0, not reported for 3.1 + assertNoMessage(server, " - Message: The Schema Object of \"array\" type must have \"items\" property defined"); + } + +} diff --git a/dev/io.openliberty.microprofile.openapi.4.0.internal_fat/fat/src/io/openliberty/microprofile/openapi40/fat/validation/ValidationTestFour.java b/dev/io.openliberty.microprofile.openapi.4.0.internal_fat/fat/src/io/openliberty/microprofile/openapi40/fat/validation/ValidationTestFour.java new file mode 100644 index 000000000000..0b2588c1a9b4 --- /dev/null +++ b/dev/io.openliberty.microprofile.openapi.4.0.internal_fat/fat/src/io/openliberty/microprofile/openapi40/fat/validation/ValidationTestFour.java @@ -0,0 +1,130 @@ +/******************************************************************************* + * Copyright (c) 2024 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ +package io.openliberty.microprofile.openapi40.fat.validation; + +import static com.ibm.websphere.simplicity.ShrinkHelper.DeployOptions.SERVER_ONLY; +import static io.openliberty.microprofile.openapi40.fat.validation.ValidationTestUtils.assertMessage; +import static io.openliberty.microprofile.openapi40.fat.validation.ValidationTestUtils.assertNoMessage; + +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.AfterClass; +import org.junit.BeforeClass; +import org.junit.Test; +import org.junit.runner.RunWith; + +import com.ibm.websphere.simplicity.ShrinkHelper; + +import componenttest.annotation.Server; +import componenttest.custom.junit.runner.FATRunner; +import componenttest.topology.impl.LibertyServer; + +/** + * Validation tests for References, Callbacks and PathItems + *

+ * Ported from OpenAPIValidationTestFour and converted to run on OpenAPI v3.1 + */ +@RunWith(FATRunner.class) +public class ValidationTestFour { + private static final String SERVER_NAME = "OpenAPIValidationServer"; + + @Server(SERVER_NAME) + public static LibertyServer server; + + @BeforeClass + public static void setup() throws Exception { + WebArchive war = ShrinkWrap.create(WebArchive.class, "validation4.war") + .addAsManifestResource(ValidationTestFour.class.getPackage(), "validation4.yml", "openapi.yml"); + ShrinkHelper.exportDropinAppToServer(server, war, SERVER_ONLY); + + server.startServer(); + } + + @AfterClass + public static void shutdown() throws Exception { + server.stopServer("CWWKO1650E", // Validation errors found + "CWWKO1651W");// Validation warnings found + } + + @Test + public void testRef() throws Exception { + + // 3.1 Validation cases + // Reference is null/empty (reference is null) + // Reference is not a valid URI (URI.create does not parse it) (reference is not a valid URI) + // Ref is within components and components is missing (reference not defined within Components) + // Ref is to a known name within components and the object is missing (reference not defined within Components) + // Ref is to an object but the object is of the wrong type (is an invalid reference) - only reported if no other errors + + // Main differences from 3.0: + // We directly test whether the reference parses as a URI + // We don't report the "is an invalid reference" error if we report another problem with the same reference + // We don't validate references which aren't of the form #/components// - 3.0 reports some of these as "not in a valid format" + // - the spec doesn't restrict where a json pointer to point to + // - we could do better validation here, but we can't currently navigate the model reflectively by name, so following a json pointer is not easy + + // Currently outstanding issues: + // Unqualified schema references do not get automatically prefixed with '#/components/schemas/' + // - https://github.com/smallrye/smallrye-open-api/issues/1987 + +// assertMessage(server, " - Message: The \"#/components/schemas/\" reference value is not in a valid format, Location: #/paths/~1availability/get/parameters/schema"); +// assertMessage(server, " - Message: The \"#/components/schemas/ \" reference value is not defined within the Components Object, " +// + "Location: #/paths/~1availability/get/parameters/schema"); +// assertMessage(server, " - Message: The \"#/components/schemas/#\" reference value is not defined within the Components Object, " +// + "Location: #/paths/~1availability/get/parameters/schema"); + + // 3-part reference with an invalid type + assertMessage(server, " - Message: The \"#/components/Flight\" reference value is not defined within the Components Object, " + + "Location: #/paths/~1availability/get/responses/200/content/applictaion~1json/schema/items"); + // 4-part reference with an invalid type + assertMessage(server, " - Message: The \"#/components//Booking\" reference value is not defined within the Components Object, " + + "Location: #/paths/~1bookings/get/responses/200/content/application~1json/schema/items"); + // 3-part reference with a valid type + // When it's a schema, this is technically a valid reference since almost any map is a valid schema with extra fields + assertNoMessage(server, " - Message: The \"#/components/schemas\" reference"); + // When it's not a schema, we should get an error + assertMessage(server, " - Message: The \"#/components/schemas\" value is an invalid reference, " + + "Location: #/paths/~1availability/get/parameters"); + + assertMessage(server, " - Message: The \"#/components/requestBodies/Pet\" reference value is not defined within the Components Object, " + + "Location: #/paths/~1bookings/post/requestBody"); + assertMessage(server, " - Message: The \"#/components/responses/Pet\" reference value is not defined within the Components Object,"); + assertMessage(server, " - Message: The \"#/components/schemas/schemas\" reference value is not defined within the Components Object,"); + assertMessage(server, " - Message: The \"#/components/schemas/Pet\" reference value is not defined within the Components Object,"); + assertMessage(server, " - Message: The \"#/components/examples/Pet\" reference value is not defined within the Components Object, " + + "Location: #/paths/~1reviews/post/requestBody/content/application~1json/examples/review"); + + // Valid references to something of the wrong type + assertMessage(server, " - Message: The \"#/components/schemas/Flight\" value is an invalid reference, " + + "Location: #/paths/~1availability/get/parameters"); + assertMessage(server, "The \"http://\\{\\}/#/test\" value is not a valid URI, Location: #/paths/~1availability/get/parameters"); + } + + @Test + public void testCallbacks() throws Exception { + assertMessage(server, " - Message: The URL template of Callback Object is empty and is not a valid URL, Location: #/paths/~1bookings/post/callbacks/getBookings"); + assertMessage(server, " - Message: The Callback Object contains invalid substitution variables:*"); + assertMessage(server, " - Message: The Callback Object must contain a valid runtime expression as defined in the OpenAPI Specification.*"); + } + + @Test + public void testPathItems() throws Exception { + assertMessage(server, " - Message: The Path Item Object must contain a valid path\\. " + + "The \"DELETE\" operation of the \"/bookings/\\{id\\}\" path does not define a path parameter that is declared"); + assertMessage(server, " - Message: The Path Item Object must contain a valid path\\. " + + "The format of the \"http://localhost:9080/o\\{as3-ai\\{rl\\}ines/booking\" path is invalid"); + assertMessage(server, " - Message: The Path Item Object must contain a valid path\\. " + + "The \"GET\" operation from the \"/reviews/\\{airline\\}\" path defines a duplicated \"path\" parameter: \"airline\""); + assertMessage(server, " - Message: The Path Item Object must contain a valid path\\. " + + "The \"PUT\" operation from the \"/reviews\" path defines one path parameter that is not declared: \"\\[id\\]\""); + assertMessage(server, 4, " - Message: The Path Item Object must contain a valid path."); + } + +} diff --git a/dev/io.openliberty.microprofile.openapi.4.0.internal_fat/fat/src/io/openliberty/microprofile/openapi40/fat/validation/ValidationTestMissing.java b/dev/io.openliberty.microprofile.openapi.4.0.internal_fat/fat/src/io/openliberty/microprofile/openapi40/fat/validation/ValidationTestMissing.java new file mode 100644 index 000000000000..69c246c327c6 --- /dev/null +++ b/dev/io.openliberty.microprofile.openapi.4.0.internal_fat/fat/src/io/openliberty/microprofile/openapi40/fat/validation/ValidationTestMissing.java @@ -0,0 +1,63 @@ +/******************************************************************************* + * Copyright (c) 2024 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ +package io.openliberty.microprofile.openapi40.fat.validation; + +import static com.ibm.websphere.simplicity.ShrinkHelper.DeployOptions.SERVER_ONLY; +import static io.openliberty.microprofile.openapi40.fat.validation.ValidationTestUtils.assertNoMessage; + +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.AfterClass; +import org.junit.BeforeClass; +import org.junit.Test; +import org.junit.runner.RunWith; + +import com.ibm.websphere.simplicity.ShrinkHelper; + +import componenttest.annotation.Server; +import componenttest.custom.junit.runner.FATRunner; +import componenttest.topology.impl.LibertyServer; + +/** + * Validate main required elements being missing + *

+ * Includes the tests from OpenAPIValidationTestThree, updated for OpenAPI v3.1 + */ +@RunWith(FATRunner.class) +public class ValidationTestMissing { + private static final String SERVER_NAME = "OpenAPIValidationServer"; + + @Server(SERVER_NAME) + public static LibertyServer server; + + @BeforeClass + public static void setup() throws Exception { + WebArchive war = ShrinkWrap.create(WebArchive.class, "validation-missing.war") + .addAsManifestResource(ValidationTestMissing.class.getPackage(), "validation-missing.yml", "openapi.yml"); + ShrinkHelper.exportDropinAppToServer(server, war, SERVER_ONLY); + + server.startServer(); + } + + @AfterClass + public static void shutdown() throws Exception { + server.stopServer(); + } + + @Test + public void testEmpty() throws Exception { + // Smallrye OpenAPI always generates an empty paths object and a minimal info object if there isn't one present + // This is explicitly valid: https://spec.openapis.org/oas/v3.1.0.html#paths-object + // This also means we can't actually hit the case where none of paths, components or webhooks are present + assertNoMessage(server, "CWWKO1650E"); // Assert no validation errors + assertNoMessage(server, "CWWKO1651W"); // Assert no validation warnings + } + +} diff --git a/dev/io.openliberty.microprofile.openapi.4.0.internal_fat/fat/src/io/openliberty/microprofile/openapi40/fat/validation/ValidationTestNoErrors.java b/dev/io.openliberty.microprofile.openapi.4.0.internal_fat/fat/src/io/openliberty/microprofile/openapi40/fat/validation/ValidationTestNoErrors.java new file mode 100644 index 000000000000..9af2e06be2d0 --- /dev/null +++ b/dev/io.openliberty.microprofile.openapi.4.0.internal_fat/fat/src/io/openliberty/microprofile/openapi40/fat/validation/ValidationTestNoErrors.java @@ -0,0 +1,55 @@ +/******************************************************************************* + * Copyright (c) 2024 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ +package io.openliberty.microprofile.openapi40.fat.validation; + +import static com.ibm.websphere.simplicity.ShrinkHelper.DeployOptions.SERVER_ONLY; +import static io.openliberty.microprofile.openapi40.fat.validation.ValidationTestUtils.assertNoMessage; + +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.AfterClass; +import org.junit.BeforeClass; +import org.junit.Test; +import org.junit.runner.RunWith; + +import com.ibm.websphere.simplicity.ShrinkHelper; + +import componenttest.annotation.Server; +import componenttest.custom.junit.runner.FATRunner; +import componenttest.topology.impl.LibertyServer; + +@RunWith(FATRunner.class) +public class ValidationTestNoErrors { + private static final String SERVER_NAME = "OpenAPIValidationServer"; + + @Server(SERVER_NAME) + public static LibertyServer server; + + @BeforeClass + public static void setup() throws Exception { + WebArchive war = ShrinkWrap.create(WebArchive.class, "validation-noerrors.war") + .addAsManifestResource(ValidationTestNoErrors.class.getPackage(), "validation-noerrors.yml", "openapi.yml"); + ShrinkHelper.exportDropinAppToServer(server, war, SERVER_ONLY); + + server.startServer(); + } + + @AfterClass + public static void shutdown() throws Exception { + server.stopServer(); + } + + @Test + public void testNoErrors() throws Exception { + assertNoMessage(server, "CWWKO1650E"); // Assert no validation errors + assertNoMessage(server, "CWWKO1651W"); // Assert no validation warnings + } + +} diff --git a/dev/io.openliberty.microprofile.openapi.4.0.internal_fat/fat/src/io/openliberty/microprofile/openapi40/fat/validation/ValidationTestOne.java b/dev/io.openliberty.microprofile.openapi.4.0.internal_fat/fat/src/io/openliberty/microprofile/openapi40/fat/validation/ValidationTestOne.java new file mode 100644 index 000000000000..2069bc6eeba3 --- /dev/null +++ b/dev/io.openliberty.microprofile.openapi.4.0.internal_fat/fat/src/io/openliberty/microprofile/openapi40/fat/validation/ValidationTestOne.java @@ -0,0 +1,136 @@ +/******************************************************************************* + * Copyright (c) 2024 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ +package io.openliberty.microprofile.openapi40.fat.validation; + +import static com.ibm.websphere.simplicity.ShrinkHelper.DeployOptions.SERVER_ONLY; +import static io.openliberty.microprofile.openapi40.fat.validation.ValidationTestUtils.assertMessage; +import static io.openliberty.microprofile.openapi40.fat.validation.ValidationTestUtils.assertNoMessage; + +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.AfterClass; +import org.junit.BeforeClass; +import org.junit.Test; +import org.junit.runner.RunWith; + +import com.ibm.websphere.simplicity.ShrinkHelper; + +import componenttest.annotation.Server; +import componenttest.custom.junit.runner.FATRunner; +import componenttest.topology.impl.LibertyServer; +import componenttest.topology.utils.FATServletClient; + +/** + * Does the same validation checks from OpenAPIValidationTestOne but using an OpenAPI 3.1 document + * + * Covers: Info, Contact, License, ServerVariable(s), Server(s), PathItem, Operation, ExternalDocumentation, + * SecurityRequirement, RequestBody, Response, Responses + */ +@RunWith(FATRunner.class) +public class ValidationTestOne extends FATServletClient { + + private static final String SERVER_NAME = "OpenAPIValidationServer"; + + @Server(SERVER_NAME) + public static LibertyServer server; + + @BeforeClass + public static void setup() throws Exception { + WebArchive war = ShrinkWrap.create(WebArchive.class, "validation.war") + .addAsManifestResource(ValidationTestOne.class.getPackage(), "validation1.yml", "openapi.yml"); + ShrinkHelper.exportDropinAppToServer(server, war, SERVER_ONLY); + + server.startServer(); + } + + @AfterClass + public static void shutdown() throws Exception { + server.stopServer("CWWKO1650E", // Validation errors found + "CWWKO1651W");// Validation warnings found + } + + @Test + public void testErrorAndWarningMessages() throws Exception { + assertMessage(server, "CWWKO1650E"); // Validation errors found + assertMessage(server, "CWWKO1651W"); // Validation warnings found + } + + @Test + public void testInfoValidation() throws Exception { + assertMessage(server, "Message: The Info Object must contain a valid URL. The \"not in URL format\" value specified for \"termsOfService\""); + } + + @Test + public void testContactValidation() throws Exception { + assertMessage(server, "Message: The Contact Object must contain a valid URL. The \"not in URL Format\" value specified"); + assertMessage(server, "Message: The Contact Object must contain a valid email address. The \"not an email\" value"); + } + + @Test + public void testServerValidation() throws Exception { + assertMessage(server, 4, "Message: The Server Object must contain a valid URL"); + assertMessage(server, "Message: Required \"url\" field is missing or is set to an invalid value, Location: #/paths/~1reviews/get/servers"); + assertMessage(server, "The \"extraVariable\" variable in the Server Object is not defined"); + assertMessage(server, "Message: The \"id\" variable in the Server Object is not defined"); + } + + @Test + public void testServerVariableValidation() throws Exception { + assertMessage(server, "Message: Required \"default\" field is missing or is set to an invalid value"); + } + + @Test + public void testPathItemValidation() throws Exception { + assertMessage(server, + "The \"id\" path parameter from the \"GET\" operation of the path \"/bookings/\\{id\\}\" does not contain the \"required\" field or its value is not \"true\""); + assertMessage(server, "The \"GET\" operation of the \"/reviews/\\{id\\}\" path does not define a path parameter that is declared: \"id\""); + assertMessage(server, + "The Path Item Object must contain a valid path. The \"GET\" operation from the \"/reviews/\\{airline\\}\" path defines a duplicated \"path\" parameter: \"airline\""); + assertMessage(server, "The Paths Object contains an invalid path. The \"noSlashPath\" path value does not begin with a slash"); + assertMessage(server, "The Path Item Object must contain a valid path. The format of the \"/availability/"); + assertMessage(server, " The \"userFirstName\" path parameter from the \"GET\" operation of the path \"/operationWithParam\" does not contain the \"required\" field"); + assertMessage(server, + "The Path Item Object must contain a valid path. The \"/\\{username\\}\" path defines \"3\" path parameters that are not declared: \"\\[pathWithUndeclaredParams, usernameParam, accountNumber\\]\""); + assertMessage(server, "The \"GET\" operation from the \"/operationWithParam\" path defines one path parameter that is not declared: \"\\[userFirstName\\]\""); + } + + @Test + public void testOperationValidation() throws Exception { + // This is no longer an error in OpenAPI 3.1 + assertNoMessage(server, "Message: Required \"responses\" field is missing or is set to an invalid value, Location: #/paths/~1/get"); + assertMessage(server, "Message: More than one Operation Objects with \"getReviewById\" value for \"operationId\" field was found. The \"operationId\" must be unique"); + } + + @Test + public void testExternalDocsValidation() throws Exception { + assertMessage(server, "Message: The External Documentation Object must contain a valid URL. The \"not a URL\" value"); + } + + @Test + public void testSecurityRequirementValidation() throws Exception { + assertMessage(server, "The \"reviewoauth2\" name provided for the Security Requirement Object does not correspond to a declared security scheme"); + } + + @Test + public void testRequestBodyValidation() throws Exception { + assertMessage(server, "Message: Required \"content\" field is missing or is set to an invalid value, Location: #/paths/~1reviews/post/requestBody"); + } + + @Test + public void testResponseValidation() throws Exception { + assertMessage(server, "Message: Required \"description\" field is missing or is set to an invalid value"); + } + + @Test + public void testResponsesValidation() throws Exception { + assertMessage(server, "Message: The Responses Object should contain at least one response code for a successful operation"); + } + +} diff --git a/dev/io.openliberty.microprofile.openapi.4.0.internal_fat/fat/src/io/openliberty/microprofile/openapi40/fat/validation/ValidationTestTwo.java b/dev/io.openliberty.microprofile.openapi.4.0.internal_fat/fat/src/io/openliberty/microprofile/openapi40/fat/validation/ValidationTestTwo.java new file mode 100644 index 000000000000..affe3fcbddd7 --- /dev/null +++ b/dev/io.openliberty.microprofile.openapi.4.0.internal_fat/fat/src/io/openliberty/microprofile/openapi40/fat/validation/ValidationTestTwo.java @@ -0,0 +1,106 @@ +/******************************************************************************* + * Copyright (c) 2024 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ +package io.openliberty.microprofile.openapi40.fat.validation; + +import static com.ibm.websphere.simplicity.ShrinkHelper.DeployOptions.SERVER_ONLY; +import static io.openliberty.microprofile.openapi40.fat.validation.ValidationTestUtils.assertMessage; + +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.AfterClass; +import org.junit.BeforeClass; +import org.junit.Test; +import org.junit.runner.RunWith; + +import com.ibm.websphere.simplicity.ShrinkHelper; + +import componenttest.annotation.Server; +import componenttest.custom.junit.runner.FATRunner; +import componenttest.topology.impl.LibertyServer; + +/** + * Test validation rules for SecurityScheme, SecurityRequirement, OAuthFlow, OAuthFlows, MediaType and Example + *

+ * Ported from OpenAPIValidationTestTwo and converted to run on OpenAPI v3.1 + */ +@RunWith(FATRunner.class) +public class ValidationTestTwo { + private static final String SERVER_NAME = "OpenAPIValidationServer"; + + @Server(SERVER_NAME) + public static LibertyServer server; + + @BeforeClass + public static void setup() throws Exception { + WebArchive war = ShrinkWrap.create(WebArchive.class, "validation2.war") + .addAsManifestResource(ValidationTestTwo.class.getPackage(), "validation2.yml", "openapi.yml"); + ShrinkHelper.exportDropinAppToServer(server, war, SERVER_ONLY); + + server.startServer(); + } + + @AfterClass + public static void shutdown() throws Exception { + server.stopServer("CWWKO1650E", // Validation errors found + "CWWKO1651W");// Validation warnings found + } + + @Test + public void testSecuritySchemeValidation() throws Exception { + assertMessage(server, "Message: Required \"type\" field is missing or is set to an invalid value, Location: #/components/securitySchemes/noType"); + assertMessage(server, "Message: Required \"openIdConnectUrl\" field is missing or is set to an invalid value," + + " Location: #/components/securitySchemes/openIdConnectWithScheme"); + assertMessage(server, "Message: Required \"scheme\" field is missing or is set to an invalid value, Location: #/components/securitySchemes/airlinesHttp"); + assertMessage(server, "Message: Required \"flows\" field is missing or is set to an invalid value, Location: #/components/securitySchemes/reviewoauth2"); + assertMessage(server, "Message: Required \"scheme\" field is missing or is set to an invalid value, Location: #/components/securitySchemes/httpWithOpenIdConnectUrl"); + assertMessage(server, "Message: Required \"name\" field is missing or is set to an invalid value, Location: #/components/securitySchemes/ApiKeyWithScheme"); + assertMessage(server, "Message: Required \"in\" field is missing or is set to an invalid value, Location: #/components/securitySchemes/ApiKeyWithScheme"); + assertMessage(server, "Message: Required \"in\" field is missing or is set to an invalid value, Location: #/components/securitySchemes/ApiKeyWithInvalidIn"); + assertMessage(server, "Message: The Security Scheme Object must contain a valid URL. The \"not a URL\" value specified for the URL is not valid*"); + assertMessage(server, "Message: The \"scheme\" field with \"openIdConnectWithScheme\" value is not applicable for \"Security Scheme Object\" of \"openIdConnect\" type"); + assertMessage(server, "Message: The \"name\" field with \"oauth2WithName\" value is not applicable for \"Security Scheme Object\" of \"oauth2\" type"); + assertMessage(server, "Message: The \"openIdConnectUrl\" field with \"http://www.url.com\" value is not applicable for \"Security Scheme Object\" of \"http\" type"); + assertMessage(server, "Message: The \"flows\" field is not applicable for \"Security Scheme Object\" of \"http\" type"); + } + + @Test + public void testSecurityRequirementValidation() throws Exception { + assertMessage(server, "Message: The \"schemeNotInComponent\" name provided for the Security Requirement Object" + + " does not correspond to a declared security scheme, Location: #/paths/~1availability/get/security"); + assertMessage(server, "Message: The \"airlinesHttp\" field of Security Requirement Object should be empty, but is: \"\\[write:app, read:app\\]\""); + assertMessage(server, "Message: The \"openIdConnectWithScheme\" Security Requirement Object should specify be a list of scope names required for execution"); + } + + @Test + public void testOAuthFlowValidation() throws Exception { + assertMessage(server, 3, "Message: Required \"scopes\" field is missing or is set to an invalid value"); + assertMessage(server, "Message: The OAuth Flow Object must contain a valid URL. The \"invalid URL example\" value"); + } + + @Test + public void testOAuthFlowsValidation() throws Exception { + assertMessage(server, 2, "Message: Required \"tokenUrl\" field is missing or is set to an invalid value"); + assertMessage(server, "Message: The \"authorizationUrl\" field with \"https://example.com/api/oauth/dialog\" value" + + " is not applicable for \"OAuth Flow Object\" of \"password\" type"); + } + + @Test + public void testMediaTypeValidation() throws Exception { + assertMessage(server, 2, "Message: The \"nonExistingField\" encoding property specified in the MediaType Object does not exist"); + assertMessage(server, "Message: The MediaType Object cannot have both \"examples\" and \"example\" fields"); + assertMessage(server, "Message: The encoding property specified cannot be validated because the corresponding schema property is null"); + } + + @Test + public void testExampleValidation() throws Exception { + assertMessage(server, "Message: The \"booking\" Example Object specifies both \"value\" and \"externalValue\" fields"); + } + +} diff --git a/dev/io.openliberty.microprofile.openapi.4.0.internal_fat/fat/src/io/openliberty/microprofile/openapi40/fat/validation/ValidationTestUtils.java b/dev/io.openliberty.microprofile.openapi.4.0.internal_fat/fat/src/io/openliberty/microprofile/openapi40/fat/validation/ValidationTestUtils.java new file mode 100644 index 000000000000..cc7d7f59a45e --- /dev/null +++ b/dev/io.openliberty.microprofile.openapi.4.0.internal_fat/fat/src/io/openliberty/microprofile/openapi40/fat/validation/ValidationTestUtils.java @@ -0,0 +1,62 @@ +/******************************************************************************* + * Copyright (c) 2024 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ +package io.openliberty.microprofile.openapi40.fat.validation; + +import static org.hamcrest.Matchers.empty; +import static org.hamcrest.Matchers.hasSize; +import static org.hamcrest.Matchers.is; +import static org.hamcrest.Matchers.not; +import static org.junit.Assert.assertThat; + +import componenttest.topology.impl.LibertyServer; + +/** + * + */ +public class ValidationTestUtils { + + /** + * Assert that a message is found in the messages.log + * + * @param server the server to check + * @param message the message to find + */ + public static void assertMessage(LibertyServer server, String message) throws Exception { + assertThat("Message not found: " + message, + server.findStringsInLogs(message), + not(empty())); + } + + /** + * Assert that a message is found a specific number of times in the messages.log + * + * @param server the server to check + * @param count the number of times the message is expected + * @param message the message to look for + */ + public static void assertMessage(LibertyServer server, int count, String message) throws Exception { + assertThat("Message not found " + count + " times: " + message, + server.findStringsInLogs(message), + hasSize(count)); + } + + /** + * Assert that a message is not found in the messages log + * + * @param server the server to check + * @param message the message to search for + */ + public static void assertNoMessage(LibertyServer server, String message) throws Exception { + assertThat("Unexpected message found: " + message, + server.findStringsInLogs(message), + is(empty())); + } + +} diff --git a/dev/io.openliberty.microprofile.openapi.4.0.internal_fat/fat/src/io/openliberty/microprofile/openapi40/fat/validation/validation-missing.yml b/dev/io.openliberty.microprofile.openapi.4.0.internal_fat/fat/src/io/openliberty/microprofile/openapi40/fat/validation/validation-missing.yml new file mode 100644 index 000000000000..b3fc5ca3249a --- /dev/null +++ b/dev/io.openliberty.microprofile.openapi.4.0.internal_fat/fat/src/io/openliberty/microprofile/openapi40/fat/validation/validation-missing.yml @@ -0,0 +1,4 @@ +openapi: 3.1.0 +info: + version: 0.1 + title: empty OpenAPI doc \ No newline at end of file diff --git a/dev/io.openliberty.microprofile.openapi.4.0.internal_fat/fat/src/io/openliberty/microprofile/openapi40/fat/validation/validation-noerrors.yml b/dev/io.openliberty.microprofile.openapi.4.0.internal_fat/fat/src/io/openliberty/microprofile/openapi40/fat/validation/validation-noerrors.yml new file mode 100644 index 000000000000..cfdfa72feaf3 --- /dev/null +++ b/dev/io.openliberty.microprofile.openapi.4.0.internal_fat/fat/src/io/openliberty/microprofile/openapi40/fat/validation/validation-noerrors.yml @@ -0,0 +1,554 @@ +openapi: 3.1.0 +info: + title: Validation App + version: "1.0" + termsOfService: http://www.termsofservice.com + contact: + name: AirlinesRatingApp API Support + url: http://www.contacts.com + email: airlines@gmail.com + license: + name: Apache 2.0 + url: http://www.license.com +externalDocs: + description: instructions for how to deploy this app + url: http://www.externaldocumentation.com +servers: +- url: http://localhost:9080 +tags: +- name: Airlines + description: airlines app +- name: airline + description: all the airlines methods +- name: availability + description: all the availibility methods +- name: bookings + description: all the bookings methods +- name: reviews + description: all the review methods +paths: + /: + get: + tags: + - airline + summary: Retrieve all available airlines + responses: + 202: + description: failed operation + content: + applictaion/json: + schema: + $ref: '#/components/schemas/Flight' + operationId: getAirlines + servers: + - url: localhost:9080/oas3-airlines/airlines/id + description: view of all the bookings + /availability: + get: + tags: + - availability + summary: Retrieve all available flights + operationId: getFlights + parameters: + - name: departureDate + in: query + description: Customer departure date + required: true + schema: + type: string + - name: airportFrom + in: query + description: Airport the customer departs from + required: true + schema: + type: string + - name: returningDate + in: query + description: Customer return date + required: true + schema: + type: string + - name: airportTo + in: query + description: Airport the customer returns to + required: true + schema: + type: string + - name: numberOfAdults + in: query + description: Number of adults on the flight + required: true + schema: + minimum: 0 + type: string + - name: numberOfChildren + in: query + description: Number of children on the flight + required: true + schema: + minimum: 0 + type: string + responses: + 202: + description: failed operation + content: + applictaion/json: + schema: + $ref: '#/components/schemas/Flight' + 404: + description: No available flights found + content: + n/a: {} + servers: + - url: localhost:9080/oas3-airlines/availability + description: view of all the bookings + /bookings: + get: + tags: + - bookings + summary: Retrieve all bookings for current user + operationId: getBookings + responses: + 200: + description: Bookings retrieved + content: + application/json: + schema: + type: string + 404: + description: No bookings found for the user. + post: + tags: + - bookings + summary: Create a booking + description: Create a new booking record with the booking information provided. + operationId: createBooking + requestBody: + description: Create a new booking with the provided information. + content: + application/json: + schema: + $ref: '#/components/schemas/Booking' + examples: + booking: + summary: External booking example + externalValue: http://foo.bar/examples/booking-example.json + responses: + 201: + description: Booking created + content: + application/json: + schema: + type: string + description: id of the new booking + + /bookings/{id}: + get: + tags: + - bookings + summary: Get a booking with ID + operationId: getBooking + parameters: + - name: id + required: true + in: path + description: ID of the booking + schema: + type: integer + responses: + 200: + description: booking retrieved + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Booking' + 404: + description: No bookings found for the user. + servers: + - url: localhost:9080/oas3-airlines/bookings/{id} + description: view of all the bookings for this user + variables: + id: + default: "1" + description: id of the review + put: + tags: + - bookings + summary: Update a booking with ID + operationId: updateBooking + parameters: + - name: id + in: path + description: ID of the booking + required: true + schema: + type: integer + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Booking' + responses: + 200: + description: Booking updated + 404: + description: Booking not found + delete: + tags: + - bookings + summary: Delete a booking with ID + operationId: deleteBooking + parameters: + - name: id + in: path + required: true + schema: + type: integer + responses: + 200: + description: Booking deleted successfully. + 404: + description: Booking not found. + /reviews: + get: + tags: + - reviews + summary: get all the reviews + operationId: getReview + responses: + 200: + description: successful operation + content: + application/json: + schema: + type: array + items: + oneOf: + - $ref: '#/components/schemas/Review' + servers: + - url: localhost:9080/oas3-airlines/reviews + description: endpoint for all the review related methods + post: + tags: + - reviews + summary: Create a Review + operationId: createReview + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Review' + description: example review to add + required: true + responses: + 201: + description: review created + content: + application/json: + schema: + type: string + description: id of the new review + callbacks: + testCallback: + http://localhost:9080/oas3-airlines/reviews: {} + security: + - reviewoauth2: + - write:reviews + servers: + - url: localhost:9080/oas3-airlines/reviews/{id} + description: view of all the reviews + variables: + id: + description: id of the review + default: "1" + /reviews/{id}: + get: + tags: + - reviews + summary: Get a review with ID + operationId: getReviewById + parameters: + - name: id + in: path + description: ID of the booking + required: true + content: + '*/*': + schema: + type: integer + responses: + 200: + description: Review retrieved + content: + application/json: + schema: + $ref: '#/components/schemas/Review' + 404: + description: Review not found + servers: + - url: localhost:9080/oas3-airlines/reviews/{id} + description: endpoint for all the review related methods + variables: + id: + default: "11" + description: id of the review + delete: + tags: + - reviews + summary: Delete a Review with ID + operationId: deleteReview + parameters: + - name: id + in: path + required: true + schema: + type: integer + responses: + 200: + description: Review deleted + 404: + description: Review not found + /reviews/{user}: + get: + tags: + - reviews + summary: Get all reviews by user + operationId: getReviewByUser + parameters: + - name: user + in: path + description: username of the user for the reviews + required: true + content: + '*/*': + schema: + type: string + examples: + ? + : value: bsmith + responses: + 200: + description: Review(s) retrieved + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/Review' + - $ref: '#/components/schemas/User' + discriminator: + propertyName: pet_type + mapping: + review: '#/components/schemas/Review' + user: '#/components/schemas/User' + 404: + description: Review(s) not found + /reviews/{airline}: + get: + tags: + - reviews + summary: Get all reviews by airlines + operationId: getReviewByAirline + parameters: + - name: airline + in: path + description: name of the airlines for the reviews + required: true + content: + '*/*': + schema: + type: string + examples: + ? + : value: Acme Air + responses: + 200: + description: Review(s) retrieved + content: + application/json: + schema: + $ref: '#/components/schemas/Review' + 404: + description: Review(s) not found + /reviews/{user}/{airlines}: + get: + tags: + - reviews + summary: Get all reviews for an airline by User + operationId: getReviewByAirlineAndUser + parameters: + - name: user + in: path + required: true + schema: + type: string + - name: airlines + in: path + required: true + schema: + type: string + responses: + 200: + description: Review(s) retrieved + content: + application/json: + schema: + $ref: '#/components/schemas/Review' + 404: + description: Review(s) not found +components: + schemas: + User: + required: + - age + - email + - firstName + - lastName + - password + - phone + - sex + type: object + properties: + password: + type: string + example: bobSm37 + firstName: + type: string + example: Bob + lastName: + type: string + example: Smith + sex: + type: string + example: M + age: + type: integer + example: 37 + email: + type: string + example: bob@test.ca + phone: + type: string + example: 123-456-7890 + id: + type: integer + username: + type: string + status: + title: User Status + type: integer + Airline: + required: + - contactPhone + - name + type: object + properties: + name: + type: string + example: Acme Air + contactPhone: + type: string + example: 1-888-1234-567 + Flight: + required: + - airportFrom + - airportTo + - dateTime + - number + - price + - status + type: object + properties: + airline: + $ref: '#/components/schemas/Airline' + dateTime: + pattern: dateTime + type: string + example: 2016-03-05 18:00 + number: + type: string + example: AC190 + status: + type: string + example: On Schedule + airportFrom: + type: string + example: YYZ + airportTo: + type: string + example: LAX + price: + type: string + example: US$350 + Booking: + required: + - airMiles + - seatPreference + type: object + properties: + departtureFlight: + $ref: '#/components/schemas/Flight' + returningFlight: + $ref: '#/components/schemas/Flight' + creditCard: + $ref: '#/components/schemas/CreditCard' + airMiles: + type: string + example: 32126319 + seatPreference: + type: string + example: window + Review: + required: + - id + - rating + type: object + properties: + id: + type: string + example: 0 + user: + $ref: '#/components/schemas/User' + airlines: + $ref: '#/components/schemas/Airline' + rating: + type: integer + example: 8 + comment: + type: string + example: Great service! + CreditCard: + required: + - cardNumber + - cardholderName + - cvv + - expiryDate + - issuer + type: object + properties: + issuer: + type: string + example: VISA + cardholderName: + type: string + example: Joe Smith + cardNumber: + type: string + example: '**********1234' + cvv: + type: string + example: "0322" + expiryDate: + type: string + example: 04/19 + securitySchemes: + reviewoauth2: + type: oauth2 + description: authentication needed to create and delete reviews + flows: + implicit: + authorizationUrl: https://example.com/api/oauth/dialog + scopes: + write:reviews: create a review + \ No newline at end of file diff --git a/dev/io.openliberty.microprofile.openapi.4.0.internal_fat/fat/src/io/openliberty/microprofile/openapi40/fat/validation/validation1.yml b/dev/io.openliberty.microprofile.openapi.4.0.internal_fat/fat/src/io/openliberty/microprofile/openapi40/fat/validation/validation1.yml new file mode 100644 index 000000000000..a24a6ba68b41 --- /dev/null +++ b/dev/io.openliberty.microprofile.openapi.4.0.internal_fat/fat/src/io/openliberty/microprofile/openapi40/fat/validation/validation1.yml @@ -0,0 +1,570 @@ +openapi: 3.1.0 +info: + termsOfService: not in URL format + contact: + name: AirlinesRatingApp API Support + url: not in URL Format + email: not an email + license: + url: not in URL format +externalDocs: + description: instructions for how to deploy this app + url: not a URL +servers: +- url: http://localhost:9080 +tags: +- name: Airlines + description: airlines app +- name: airline + description: all the airlines methods +- name: availability + description: all the availibility methods +- name: bookings + description: all the bookings methods +- name: reviews + description: all the review methods +paths: + noSlashPath: + get: + summary: A path with no slash + operationId: noSlashPath + /availability/{us{ser}}: + get: + summary: Invalid string path + /{username}: + parameters: + - name: pathWithUndeclaredParams + description: Path with undecalred parameters + in: path + schema: + type: string + required: true + - name: usernameParam + description: Declared path parameter + in: path + schema: + type: string + required: true + - name: accountNumber + description: Another undeclared path parameter + in: path + schema: + type: string + required: true + /operationWithParam: + get: + summary: A get method with path parameter and required set to false + parameters: + - name: userFirstName + description: username parameter + in: path + schema: + type: string + required: false + /: + get: + tags: + - airline + summary: Retrieve all available airlines + operationId: getAirlines + servers: + - url: localhost:9080/oas3-airlines{/}airlines/id + description: view of all the bookings + /availability: + get: + tags: + - availability + summary: Retrieve all available flights + operationId: getFlights + parameters: + - name: departureDate + description: Customer departure date + required: true + schema: + type: string + - name: airportFrom + in: query + description: Airport the customer departs from + required: true + schema: + type: string + - name: returningDate + in: query + description: Customer return date + required: true + schema: + type: string + - name: airportTo + in: query + description: Airport the customer returns to + required: true + schema: + type: string + - name: numberOfAdults + in: query + description: Number of adults on the flight + required: true + schema: + minimum: 0 + type: string + - name: numberOfChildren + in: query + description: Number of children on the flight + required: true + schema: + minimum: 0 + type: string + responses: + 402: + description: failed operation + content: + applictaion/json: + schema: + $ref: '#/components/schemas/Flight' + 404: + description: No available flights found + content: + n/a: {} + servers: + - url: localhost:9080/oas3-airlines{}/availability + description: view of all the bookings + /bookings: + get: + tags: + - bookings + summary: Retrieve all bookings for current user + operationId: getBookings + responses: + 200: + description: Bookings retrieved + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Booking' + 404: + description: No bookings found for the user. + servers: + - url: localhost:9080/oas3-ai{rlines/bookings/ + description: view of all the bookings for this user + variables: + id: + description: id of the review + post: + tags: + - bookings + summary: Create a booking + description: Create a new booking record with the booking information provided. + operationId: createBooking + requestBody: + description: Create a new booking with the provided information. + content: + application/json: + schema: + $ref: '#/components/schemas/Booking' + examples: + booking: + summary: External booking example + externalValue: http://foo.bar/examples/booking-example.json + responses: + 201: + description: Booking created + content: + application/json: + schema: + type: string + description: id of the new booking + callbacks: + get all the bookings: + http://localhost:9080/airlines/bookings: {} + /bookings/{id}: + get: + tags: + - bookings + summary: Get a booking with ID + operationId: getBooking + parameters: + - name: id + in: path + description: ID of the booking + schema: + type: integer + responses: + 200: + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Booking' + 404: + description: No bookings found for the user. + servers: + - url: localhost:9080/}oas3-airlines{/bookings/id + description: view of all the bookings + put: + tags: + - bookings + summary: Update a booking with ID + operationId: updateBooking + parameters: + - name: id + in: path + description: ID of the booking + required: true + schema: + type: integer + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Booking' + responses: + 200: + description: Booking updated + 404: + description: Booking not found + delete: + tags: + - bookings + summary: Delete a booking with ID + operationId: deleteBooking + parameters: + - name: id + in: path + required: true + schema: + type: integer + responses: + 200: + description: Booking deleted successfully. + 404: + description: Booking not found. + /reviews: + get: + tags: + - reviews + summary: get all the reviews + operationId: getReviewById + responses: + 200: + description: successful operation + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Review' + servers: + - description: endpoint for all the review related methods + post: + tags: + - reviews + summary: Create a Review + operationId: createReview + requestBody: + description: example review to add + required: true + responses: + 201: + description: review created + content: + application/json: + schema: + type: string + description: id of the new review + callbacks: + testCallback: + http://localhost:9080/oas3-airlines/reviews: {} + security: + - reviewoauth2: + - write:reviews + - httpTestScheme: [] + servers: + - url: localhost:9080/oas3-airlines/reviews/{id}/{extraVariable}/ + description: view of all the reviews + variables: + id: + description: id of the review + default: "1" + '': + description: test + /reviews/{id}: + get: + tags: + - reviews + summary: Get a review with ID + operationId: getReviewById + parameters: + - name: id + description: ID of the booking + required: true + content: + '*/*': + schema: + type: integer + responses: + 200: + description: Review retrieved + content: + application/json: + schema: + $ref: '#/components/schemas/Review' + 404: + description: Review not found + servers: + - url: localhost:9080/oas3-airlines/reviews/{id} + description: endpoint for all the review related methods + delete: + tags: + - reviews + summary: Delete a Review with ID + operationId: deleteReview + parameters: + - name: id + in: path + required: true + schema: + type: integer + responses: + 200: + description: Review deleted + 404: + description: Review not found + /reviews/{user}: + get: + tags: + - reviews + summary: Get all reviews by user + operationId: getReviewByUser + parameters: + - name: user + in: path + description: username of the user for the reviews + required: true + content: + '*/*': + schema: + type: string + examples: + ? + : value: bsmith + responses: + 200: + description: Review(s) retrieved + content: + application/json: + schema: + $ref: '#/components/schemas/Review' + 404: + description: Review(s) not found + /reviews/{airline}: + get: + tags: + - reviews + summary: Get all reviews by airlines + operationId: getReviewByAirline + parameters: + - name: airline + in: path + description: name of the airlines for the reviews + required: true + content: + '*/*': + schema: + type: string + examples: + ? + : value: Acme Air + - name: airline + in: path + description: name of the airlines for the reviews + required: true + content: + '*/*': + schema: + type: string + examples: + ? + : value: Acme Air + responses: + 200: + description: Review(s) retrieved + content: + application/json: + schema: + $ref: '#/components/schemas/Review' + 404: + description: Review(s) not found + /reviews/{user}/{airlines}: + get: + tags: + - reviews + summary: Get all reviews for an airline by User + operationId: getReviewByAirlineAndUser + parameters: + - name: user + in: path + required: true + schema: + type: string + - name: airlines + in: path + required: true + schema: + type: string + responses: + 200: + description: Review(s) retrieved + content: + application/json: + schema: + $ref: '#/components/schemas/Review' + 404: + description: Review(s) not found +components: + schemas: + User: + required: + - age + - email + - firstName + - lastName + - password + - phone + - sex + type: object + properties: + password: + type: string + examples: [bobSm37] + firstName: + type: string + example: Bob + lastName: + type: string + example: Smith + sex: + type: string + example: M + age: + type: integer + example: 37 + email: + type: string + example: bob@test.ca + phone: + type: string + example: 123-456-7890 + id: + type: integer + username: + type: string + status: + title: User Status + type: integer + Airline: + required: + - contactPhone + - name + type: object + properties: + name: + type: string + example: Acme Air + contactPhone: + type: string + example: 1-888-1234-567 + Flight: + required: + - airportFrom + - airportTo + - dateTime + - number + - price + - status + type: object + properties: + airline: + $ref: '#/components/schemas/Airline' + dateTime: + pattern: dateTime + type: string + example: 2016-03-05 18:00 + number: + type: string + example: AC190 + status: + type: string + example: On Schedule + airportFrom: + type: string + example: YYZ + airportTo: + type: string + example: LAX + price: + type: string + example: US$350 + Booking: + required: + - airMiles + - seatPreference + type: object + properties: + departtureFlight: + $ref: '#/components/schemas/Flight' + returningFlight: + $ref: '#/components/schemas/Flight' + creditCard: + $ref: '#/components/schemas/CreditCard' + airMiles: + type: string + example: 32126319 + seatPreference: + type: string + example: window + Review: + required: + - id + - rating + type: object + properties: + id: + type: string + example: 0 + user: + $ref: '#/components/schemas/User' + airlines: + $ref: '#/components/schemas/Airline' + rating: + type: integer + example: 8 + comment: + type: string + example: Great service! + CreditCard: + required: + - cardNumber + - cardholderName + - cvv + - expiryDate + - issuer + type: object + properties: + issuer: + type: string + example: VISA + cardholderName: + type: string + example: Joe Smith + cardNumber: + type: string + example: '**********1234' + cvv: + type: string + example: "0322" + expiryDate: + type: string + example: 04/19 \ No newline at end of file diff --git a/dev/io.openliberty.microprofile.openapi.4.0.internal_fat/fat/src/io/openliberty/microprofile/openapi40/fat/validation/validation2.yml b/dev/io.openliberty.microprofile.openapi.4.0.internal_fat/fat/src/io/openliberty/microprofile/openapi40/fat/validation/validation2.yml new file mode 100644 index 000000000000..d1fd869ffb4a --- /dev/null +++ b/dev/io.openliberty.microprofile.openapi.4.0.internal_fat/fat/src/io/openliberty/microprofile/openapi40/fat/validation/validation2.yml @@ -0,0 +1,645 @@ +openapi: 3.1.0 +info: + title: "Validation App" + version: "1.0" + termsOfService: http://www.termsofservice.com/terms + contact: + name: AirlinesRatingApp API Support + url: https://github.com/microservices-api/oas3-airlines + license: + name: Apache 2.0 + url: http://www.apache.org/licenses/LICENSE-2.0.html +externalDocs: + description: instructions for how to deploy this app +servers: +- url: http://localhost:9080 +tags: +- name: Airlines + description: airlines app +- name: airline + description: all the airlines methods +- name: availability + description: all the availibility methods +- name: bookings + description: all the bookings methods +- name: reviews + description: all the review methods +paths: + /: + get: + tags: + - airline + summary: Retrieve all available airlines + operationId: getAirlines + responses: + 200: + description: successful operation + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Airline' + 404: + description: No airlines found + content: + n/a: {} + servers: + - url: localhost:9080/oas3-airlines/airlines/id + description: view of all the bookings + /availability: + get: + tags: + - availability + summary: Retrieve all available flights + operationId: getFlights + parameters: + - name: departureDate + in: query + description: Customer departure date + required: true + schema: + type: string + - name: airportFrom + in: query + description: Airport the customer departs from + required: true + schema: + type: string + - name: returningDate + in: query + description: Customer return date + required: true + schema: + type: string + - name: airportTo + in: query + description: Airport the customer returns to + required: true + schema: + type: string + - name: numberOfAdults + in: query + description: Number of adults on the flight + required: true + schema: + minimum: 0 + type: string + - name: numberOfChildren + in: query + description: Number of children on the flight + required: true + schema: + minimum: 0 + type: string + responses: + 200: + description: successful operation + content: + applictaion/json: + schema: + type: array + items: + $ref: '#/components/schemas/Flight' + 404: + description: No available flights found + content: + n/a: {} + security: + - schemeNotInComponent: [] + - airlinesHttp: + - write:app + - read:app + - openIdConnectWithScheme: [] + /bookings: + get: + tags: + - bookings + summary: Retrieve all bookings for current user + operationId: getBookings + security: + nullScheme: [] + responses: + 200: + description: Bookings retrieved + content: + application/json: + schema: + type: object + required: + - airMiles + - seatPreference + properties: + departtureFlight: + $ref: '#/components/schemas/Flight' + returningFlight: + $ref: '#/components/schemas/Flight' + creditCard: + $ref: '#/components/schemas/CreditCard' + airMiles: + type: string + example: 32126319 + seatPreference: + type: string + example: window + encoding: + airMiles: + contentType: text/plain + nonExistingField: + contentType: text/plain + examples: + booking: + summary: External booking example + value: http://foo.bar/examples/booking-example.json + example: + booking: + summary: booking example + value: http://foo.bar/examples/booking-example.json + 404: + description: No bookings found for the user. + servers: + - url: localhost:9080/oas3-airlines/bookings/{id} + description: view of all the bookings for this user + variables: + id: + description: id of the review + default: "1" + post: + tags: + - bookings + summary: Create a booking + description: Create a new booking record with the booking information provided. + operationId: createBooking + requestBody: + description: Create a new booking with the provided information. + content: + application/json: + schema: + $ref: '#/components/schemas/Booking' + encoding: + airMiles: + contentType: text/plain + nonExistingField: + contentType: text/plain + examples: + booking: + summary: External booking example + value: http://foo.bar/examples/booking-example.json + externalValue: http://foo.bar/examples/booking-example.json + responses: + 201: + description: Booking created + content: + application/json: + schema: + type: string + description: id of the new booking + security: + callbacks: + get all the bookings: + http://localhost:9080/airlines/bookings: {} + /bookings/{id}: + get: + tags: + - bookings + summary: Get a booking with ID + operationId: getBooking + parameters: + - name: id + in: path + description: ID of the booking + required: true + schema: + type: integer + responses: + 200: + description: Bookings retrieved + content: + application/json: + schema: + '': '' + encoding: + airMiles: + contentType: text/plain + nonExistingField: + contentType: text/plain + 404: + description: No bookings found for the user. + servers: + - url: localhost:9080/oas3-airlines/bookings/id + description: view of all the bookings + put: + tags: + - bookings + summary: Update a booking with ID + operationId: updateBooking + parameters: + - name: id + in: path + description: ID of the booking + required: true + schema: + type: integer + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Booking' + responses: + 200: + description: Booking updated + 404: + description: Booking not found + delete: + tags: + - bookings + summary: Delete a booking with ID + operationId: deleteBooking + parameters: + - name: id + in: path + required: true + schema: + type: integer + responses: + 200: + description: Booking deleted successfully. + 404: + description: Booking not found. + /reviews: + get: + tags: [] + summary: get all the reviews + operationId: getAllReviews + responses: + 200: + description: successful operation + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Review' + servers: + - url: http://localhost:9080/airlines/reviews/ + description: endpoint for all the review related methods + post: + tags: [] + summary: Create a Review + operationId: createReview + requestBody: + description: example review to add + content: + application/json: + schema: + $ref: '#/components/schemas/Review' + examples: + review: + summary: External review example + externalValue: http://foo.bar/examples/review-example.json + required: true + responses: + 201: + description: review created + content: + application/json: + schema: + type: string + description: id of the new review + callbacks: + testCallback: + http://localhost:9080/oas3-airlines/reviews: {} + security: + - reviewoauth2: + - write:reviews + servers: + - url: localhost:9080/oas3-airlines/reviews/{id} + description: view of all the reviews + variables: + id: + description: id of the review + default: "1" + /reviews/{id}: + get: + tags: [] + summary: Get a review with ID + operationId: getReviewById + parameters: + - name: id + in: path + description: ID of the booking + required: true + content: + '*/*': + schema: + type: integer + examples: + id: + value: 1 + responses: + 200: + description: Review retrieved + content: + application/json: + schema: + $ref: '#/components/schemas/Review' + 404: + description: Review not found + servers: + - url: http://localhost:9080/airlines/reviews/ + description: endpoint for all the review related methods + delete: + tags: [] + summary: Delete a Review with ID + operationId: deleteReview + parameters: + - name: id + in: path + required: true + schema: + type: integer + responses: + 200: + description: Review deleted + 404: + description: Review not found + servers: + - url: http://localhost:9080/airlines/reviews/ + description: endpoint for all the review related methods + /reviews/{user}: + get: + tags: [] + summary: Get all reviews by user + operationId: getReviewByUser + parameters: + - name: user + in: path + description: username of the user for the reviews + required: true + content: + '*/*': + schema: + type: string + examples: + user: + value: bsmith + responses: + 200: + description: Review(s) retrieved + content: + application/json: + schema: + $ref: '#/components/schemas/Review' + 404: + description: Review(s) not found + servers: + - url: http://localhost:9080/airlines/reviews/ + description: endpoint for all the review related methods + /reviews/{airline}: + get: + tags: [] + summary: Get all reviews by airlines + operationId: getReviewByAirline + parameters: + - name: airline + in: path + description: name of the airlines for the reviews + required: true + content: + '*/*': + schema: + type: string + examples: + airline: + value: Acme Air + responses: + 200: + description: Review(s) retrieved + content: + application/json: + schema: + $ref: '#/components/schemas/Review' + 404: + description: Review(s) not found + servers: + - url: http://localhost:9080/airlines/reviews/ + description: endpoint for all the review related methods + /reviews/{user}/{airlines}: + get: + tags: [] + summary: Get all reviews for an airline by User + operationId: getReviewByAirlineAndUser + parameters: + - name: user + in: path + required: true + schema: + type: string + - name: airlines + in: path + required: true + schema: + type: string + responses: + 200: + description: Review(s) retrieved + content: + application/json: + schema: + $ref: '#/components/schemas/Review' + 404: + description: Review(s) not found + servers: + - url: http://localhost:9080/airlines/reviews/ + description: endpoint for all the review related methods +components: + schemas: + User: + required: + - age + - email + - firstName + - lastName + - password + - phone + - sex + type: object + properties: + password: + type: string + example: bobSm37 + firstName: + type: string + example: Bob + lastName: + type: string + example: Smith + sex: + type: string + example: M + age: + type: integer + example: 37 + email: + type: string + example: bob@test.ca + phone: + type: string + example: 123-456-7890 + id: + type: integer + username: + type: string + status: + title: User Status + type: integer + Airline: + required: + - contactPhone + - name + type: object + properties: + name: + type: string + example: Acme Air + contactPhone: + type: string + example: 1-888-1234-567 + Flight: + required: + - airportFrom + - airportTo + - dateTime + - number + - price + - status + type: object + properties: + airline: + $ref: '#/components/schemas/Airline' + dateTime: + pattern: dateTime + type: string + example: 2016-03-05 18:00 + number: + type: string + example: AC190 + status: + type: string + example: On Schedule + airportFrom: + type: string + example: YYZ + airportTo: + type: string + example: LAX + price: + type: string + example: US$350 + Booking: + required: + - airMiles + - seatPreference + type: object + properties: + departtureFlight: + $ref: '#/components/schemas/Flight' + returningFlight: + $ref: '#/components/schemas/Flight' + creditCard: + $ref: '#/components/schemas/CreditCard' + airMiles: + type: string + example: 32126319 + seatPreference: + type: string + example: window + Review: + required: + - id + - rating + type: object + properties: + id: + type: string + example: 0 + user: + $ref: '#/components/schemas/User' + airlines: + $ref: '#/components/schemas/Airline' + rating: + type: integer + example: 8 + comment: + type: string + example: Great service! + CreditCard: + required: + - cardNumber + - cardholderName + - cvv + - expiryDate + - issuer + type: object + properties: + issuer: + type: string + example: VISA + cardholderName: + type: string + example: Joe Smith + cardNumber: + type: string + example: '**********1234' + cvv: + type: string + example: "0322" + expiryDate: + type: string + example: 04/19 + securitySchemes: + nullScheme: + null + noType: + description: authentication to view availabilities + openIdConnectWithScheme: + type: openIdConnect + description: authentication needed to view all the airlines + scheme: openIdConnectWithScheme + airlinesHttp: + type: http + description: authentication needed to view all the airlines + reviewoauth2: + type: oauth2 + description: authentication needed to create and delete reviews + name: oauth2WithName + availabilityApiKey: + type: openIdConnect + description: authentication to view availabilities + openIdConnectUrl: not a URL + httpWithOpenIdConnectUrl: + type: http + flows: + implicit: + authorizationUrl: https://example.com/api/oauth/dialog + scopes: + write:reviews: create a review + authorizationCode: + authorizationUrl: https://example.com/api/oauth/dialog + tokenUrl: https://example.com/api/oauth/token + password: + authorizationUrl: https://example.com/api/oauth/dialog + clientCredentials: + refreshUrl: invalid URL example + openIdConnectUrl: http://www.url.com + availabilityOpenIdConnect: + type: openIdConnect + description: authentication to view availabilities + ApiKeyWithScheme: + type: apiKey + description: authentication needed to view all the airlines + ApiKeyWithInvalidIn: + type: apiKey + name: myApiKey + in: path + description: authentication needed to view all the airlines \ No newline at end of file diff --git a/dev/io.openliberty.microprofile.openapi.4.0.internal_fat/fat/src/io/openliberty/microprofile/openapi40/fat/validation/validation4.yml b/dev/io.openliberty.microprofile.openapi.4.0.internal_fat/fat/src/io/openliberty/microprofile/openapi40/fat/validation/validation4.yml new file mode 100644 index 000000000000..fc3a198033b6 --- /dev/null +++ b/dev/io.openliberty.microprofile.openapi.4.0.internal_fat/fat/src/io/openliberty/microprofile/openapi40/fat/validation/validation4.yml @@ -0,0 +1,690 @@ +openapi: 3.1.0 +info: + title: validation + version: "1.0" + termsOfService: http://www.termsofservice.com/terms + contact: + name: AirlinesRatingApp API Support + url: https://github.com/microservices-api/oas3-airlines + license: + name: Apache 2.0 + url: http://www.apache.org/licenses/LICENSE-2.0.html +externalDocs: + description: instructions for how to deploy this app + url: https://github.com/microservices-api/oas3-airlines +servers: +- url: http://localhost:9080 +tags: +- name: Airlines + description: airlines app +- name: airline + description: all the airlines methods +- name: availability + description: all the availibility methods +- name: bookings + description: all the bookings methods +- name: reviews + description: all the review methods +paths: + /: + get: + tags: + - airline + summary: Retrieve all available airlines + operationId: getAirlines + responses: + 200: + description: successful operation + content: + application/json: + schema: + type: array + items: + $ref: '#/invalidRef/schemas/testSchema' + 404: + description: No airlines found + content: + n/a: {} + servers: + - url: localhost:9080/oas3-airlines/airlines/id + description: view of all the bookings + /availability: + get: + tags: + - availability + summary: Retrieve all available flights + operationId: getFlights + parameters: + - name: departureDate + in: query + description: Customer departure date + required: true + schema: + type: object + $ref: "#/components/components/schemas/Date" + - name: airportFrom + in: query + description: Airport the customer departs from + required: true + schema: + type: object + $ref: "" + - name: returningDate + in: query + description: Customer return date + required: true + schema: + type: object + $ref: " " + - name: airportTo + in: query + description: Airport the customer returns to + required: true + schema: + type: object + $ref: "#/components/schemas/Airport/Cat" + - name: numberOfAdults + in: query + description: Number of adults on the flight + required: true + schema: + minimum: 0 + type: object + $ref: "#" + - name: numberOfChildren + in: query + description: Number of children on the flight + required: true + schema: + minimum: 0 + type: object + $ref: "#/" + - $ref: '#/components/schemas/Flight' + - $ref: http://{}/#/test + - $ref: '#/components/schemas' + responses: + 200: + description: successful operation + content: + applictaion/json: + schema: + type: array + items: + $ref: '#/components/Flight' + headers: + X-Rate-Limit-Limit: + name: x + in: header + description: The number of allowed requests in the current period + schema: + type: integer + 404: + description: No available flights found + content: + n/a: {} + /bookings: + get: + tags: + - bookings + summary: Retrieve all bookings for current user + operationId: getBookings + responses: + 200: + description: Bookings retrieved + content: + application/json: + schema: + type: array + items: + $ref: '#/components//Booking' + 404: + description: No bookings found for the user. + servers: + - url: localhost:9080/oas3-airlines/bookings/{id} + description: view of all the bookings for this user + variables: + id: + description: id of the review + default: "1" + post: + tags: + - bookings + summary: Create a booking + description: Create a new booking record with the booking information provided. + operationId: createBooking + requestBody: + $ref: "#/components/requestBodies/Pet" + responses: + 201: + description: Booking created + content: + application/json: + schema: + type: string + description: id of the new booking + callbacks: + getBookings: + ? + : + get: + summary: Retrieve all bookings for current user + operationId: getBookings3 + responses: + 200: + description: Bookings retrieved + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas' + 404: + description: No bookings found for the user. + /bookings/{id}: + get: + tags: + - bookings + summary: Get a booking with ID + operationId: getBooking + parameters: + - name: id + in: path + description: ID of the booking + required: true + schema: + type: integer + responses: + 200: + description: Bookings retrieved + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/schemas' + headers: + X-Rate-Limit-Limit: + description: The number of allowed requests in the current period + in: header + name: X-Rate-Limit-Limit + schema: + type: integer + + 404: + description: No bookings found for the user. + servers: + - url: localhost:9080/oas3-airlines/bookings/id + description: view of all the bookings + put: + tags: + - bookings + summary: Update a booking with ID + operationId: updateBooking + parameters: + - name: id + in: path + description: ID of the booking + required: true + schema: + type: integer + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + responses: + 200: + description: Booking updated + 404: + description: Booking not found + callbacks: + testCallback: + h://localhost:9080/oas3-airlines/booking: + get: + summary: Retrieve all bookings for current user + operationId: getBookings1 + responses: + 200: + description: Bookings retrieved + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Booking' + 404: + description: No bookings found for the user. + delete: + tags: + - bookings + summary: Delete a booking with ID + operationId: deleteBooking + parameters: + - name: id + responses: + 200: + $ref: "#/components/responses/Pet" + 404: + description: Booking not found. + callbacks: + testCallback: + http://localhost:9080/o{as3-ai{rl}ines/booking: + get: + summary: Retrieve all bookings for current user + operationId: getBookings2 + responses: + 200: + description: Bookings retrieved + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Booking' + 404: + description: No bookings found for the user. + /reviews: + get: + tags: + - reviews + summary: get all the reviews + operationId: getAllReviews + responses: + 200: + description: successful operation + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Review' + servers: + - url: http://localhost:9080/airlines/reviews/ + description: endpoint for all the review related methods + post: + tags: + - reviews + summary: Create a Review + operationId: createReview + requestBody: + description: example review to add + content: + application/json: + schema: + $ref: '#/components/schemas/Review' + examples: + review: + $ref: "#/components/examples/Pet" + required: true + responses: + 201: + description: review created + content: + application/json: + schema: + type: string + description: id of the new review + callbacks: + testCallback: + http://localhost:9080/oas3-airlines/reviews: {} + security: + - reviewoauth2: + - write:reviews + servers: + - url: localhost:9080/oas3-airlines/reviews/{id} + description: view of all the reviews + variables: + id: + description: id of the review + default: "1" + put: + tags: + - reviews + summary: Update a review with ID + operationId: updateReview + parameters: + - name: id + in: path + description: ID of the review + required: true + schema: + type: integer + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Review' + links: + review: + operationRef: "#/paths/reviews/get" + operationId: getUserREview + parameters: + userId: $request.path.id + responses: + 200: + description: Review updated + 404: + description: Review not found + callbacks: + testCallback: + http://abc.com/path/{$url}/version/{$method}/root/{$statusCodeXXX}/path: + get: + summary: Retrieve all reviews for current user + operationId: getReviews + responses: + 200: + description: Rview retrieved + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Review' + 404: + description: No bookings found for the user. + /reviews/{id}: + get: + tags: + - reviews + summary: Get a review with ID + operationId: getReviewById + parameters: + - name: id + in: path + description: ID of the booking + required: true + content: + '*/*': + schema: + type: integer + examples: + id: + value: 1 + responses: + 200: + description: Review retrieved + content: + application/json: + schema: + $ref: '#/components/schemas/Review' + 404: + description: Review not found + servers: + - url: http://localhost:9080/airlines/reviews/ + description: endpoint for all the review related methods + delete: + tags: + - reviews + summary: Delete a Review with ID + operationId: deleteReview + parameters: + - name: id + in: path + required: true + schema: + type: integer + responses: + 200: + description: Review deleted + 404: + description: Review not found + servers: + - url: http://localhost:9080/airlines/reviews/ + description: endpoint for all the review related methods + /reviews/{user}: + get: + tags: + - reviews + summary: Get all reviews by user + operationId: getReviewByUser + parameters: + - name: user + in: path + description: username of the user for the reviews + required: true + content: + '*/*': + schema: + type: string + examples: + user: + value: bsmith + responses: + 200: + description: Review(s) retrieved + content: + application/json: + schema: + $ref: '#/components/schemas/Review' + 404: + description: Review(s) not found + servers: + - url: http://localhost:9080/airlines/reviews/ + description: endpoint for all the review related methods + /reviews/{airline}: + get: + tags: + - reviews + summary: Get all reviews by airlines + operationId: getReviewByAirline + parameters: + - name: airline + in: path + description: name of the airlines for the reviews + required: true + content: + '*/*': + schema: + type: string + examples: + airline: + value: Acme Air + - name: airline + in: path + description: name of the airlines for the reviews + required: true + content: + '*/*': + schema: + type: string + examples: + airline: + value: Acme Air + responses: + 200: + description: Review(s) retrieved + content: + application/json: + schema: + $ref: '#/components/schemas/Review' + 404: + description: Review(s) not found + servers: + - url: http://localhost:9080/airlines/reviews/ + description: endpoint for all the review related methods + /reviews/{user}/{airlines}: + get: + tags: + - reviews + summary: Get all reviews for an airline by User + operationId: getReviewByAirlineAndUser + parameters: + - name: user + in: path + required: true + schema: + type: string + - name: airlines + in: path + required: true + schema: + type: string + responses: + 200: + description: Review(s) retrieved + content: + application/json: + schema: + $ref: '#/components/schemas/Review' + 404: + description: Review(s) not found + servers: + - url: http://localhost:9080/airlines/reviews/ + description: endpoint for all the review related methods +components: + schemas: + User: + required: + - age + - email + - firstName + - lastName + - password + - phone + - sex + type: object + properties: + password: + type: string + example: bobSm37 + firstName: + type: string + example: Bob + lastName: + type: string + example: Smith + sex: + type: string + example: M + age: + type: integer + example: 37 + email: + type: string + example: bob@test.ca + phone: + type: string + example: 123-456-7890 + id: + type: integer + username: + type: string + status: + title: User Status + type: integer + Airline: + required: + - contactPhone + - name + type: object + properties: + name: + type: string + example: Acme Air + contactPhone: + type: string + example: 1-888-1234-567 + Flight: + required: + - airportFrom + - airportTo + - dateTime + - number + - price + - status + type: object + properties: + airline: + $ref: '#/components/schemas/Airline' + dateTime: + pattern: dateTime + type: string + example: 2016-03-05 18:00 + number: + type: string + example: AC190 + status: + type: string + example: On Schedule + airportFrom: + type: string + example: YYZ + airportTo: + type: string + example: LAX + price: + type: string + example: US$350 + Booking: + required: + - airMiles + - seatPreference + type: object + properties: + departtureFlight: + $ref: '#/components/schemas/Flight' + returningFlight: + $ref: '#/components/schemas/Flight' + creditCard: + $ref: '#/components/schemas/CreditCard' + airMiles: + type: string + example: 32126319 + seatPreference: + type: string + example: window + Review: + required: + - id + - rating + type: object + properties: + id: + type: string + example: 0 + user: + $ref: '#/components/schemas/User' + airlines: + $ref: '#/components/schemas/Airline' + rating: + type: integer + example: 8 + comment: + type: string + example: Great service! + CreditCard: + required: + - cardNumber + - cardholderName + - cvv + - expiryDate + - issuer + type: object + properties: + issuer: + type: string + example: VISA + cardholderName: + type: string + example: Joe Smith + cardNumber: + type: string + example: '**********1234' + cvv: + type: string + example: "0322" + expiryDate: + type: string + example: 04/19 + securitySchemes: + reviewoauth2: + type: oauth2 + description: authentication needed to create and delete reviews + flows: + implicit: + authorizationUrl: https://example.com/api/oauth/dialog + scopes: + write:reviews: create a review + authorizationCode: + authorizationUrl: https://example.com/api/oauth/dialog + tokenUrl: https://example.com/api/oauth/token \ No newline at end of file diff --git a/dev/io.openliberty.microprofile.openapi.4.0.internal_fat/fat/src/io/openliberty/microprofile/openapi40/fat/validation/validation5.yml b/dev/io.openliberty.microprofile.openapi.4.0.internal_fat/fat/src/io/openliberty/microprofile/openapi40/fat/validation/validation5.yml new file mode 100644 index 000000000000..8519d4cee39d --- /dev/null +++ b/dev/io.openliberty.microprofile.openapi.4.0.internal_fat/fat/src/io/openliberty/microprofile/openapi40/fat/validation/validation5.yml @@ -0,0 +1,590 @@ +openapi: 3.1.0 +info: + title: Validation App + version: 1.0 + termsOfService: http://www.termsofservice.com + contact: + name: AirlinesRatingApp API Support + url: http://www.contacts.com + email: airlines@gmail.com + license: + name: Apache 2.0 + url: http://www.license.com +externalDocs: + description: instructions for how to deploy this app + url: http://www.externaldocumentation.com +servers: +- url: http://localhost:9080 +tags: +- description: airlines app +- name: airline + description: all the airlines methods +- name: availability + description: all the availibility methods +- name: bookings + description: all the bookings methods +- name: reviews + description: all the review methods +paths: + /: + get: + tags: + - airline + summary: Retrieve all available airlines + responses: + 202: + description: failed operation + content: + applictaion/json: + schema: + $ref: '#/components/schemas/Flight' + operationId: getAirlines + servers: + - url: localhost:9080/oas3-airlines/airlines/id + description: view of all the bookings + /availability: + get: + tags: + - availability + summary: Retrieve all available flights + operationId: getFlights + parameters: + - name: departureDate + description: Customer departure date + required: true + schema: + type: string + readOnly: true + writeOnly: true + uniqueItems: true + maxLength: -1 + minLength: -3 + - name: airportFrom + in: query + description: Airport the customer departs from + required: true + schema: + type: array + maxItems: -2 + minItems: -3 + multipleOf: 0 + - name: returningDate + in: query + description: Customer return date + required: true + schema: + type: object + minItems: 1 + maxItems: 5 + minProperties: -3 + maxProperties: -5 + - name: airportTo + in: query + description: Airport the customer returns to + required: true + schema: + type: string + - name: numberOfAdults + in: query + description: Number of adults on the flight + required: true + schema: + minimum: 0 + type: string + - name: numberOfChildren + in: query + description: Number of children on the flight + required: true + schema: + minimum: 0 + type: string + responses: + 202: + description: failed operation + content: + applictaion/json: + schema: + $ref: '#/components/schemas/Flight' + 404: + description: No available flights found + content: + n/a: {} + servers: + - url: localhost:9080/oas3-airlines/availability + description: view of all the bookings + /bookings: + get: + tags: + - bookings + summary: Retrieve all bookings for current user + operationId: getBookings + responses: + 200: + description: Bookings retrieved + content: + application/json: + schema: + type: array + items: + 404: + description: No bookings found for the user. + post: + tags: + - bookings + summary: Create a booking + description: Create a new booking record with the booking information provided. + operationId: createBooking + requestBody: + description: Create a new booking with the provided information. + content: + application/json: + schema: + $ref: '#/components/schemas/Booking' + examples: + booking: + summary: External booking example + externalValue: http://foo.bar/examples/booking-example.json + responses: + 201: + description: Booking created + content: + application/json: + schema: + type: string + description: id of the new booking + callbacks: + get all the bookings: + http://localhost:9080/airlines/bookings: + get: + tags: + - bookings + summary: Get a booking with ID + operationId: getBookingCallback + extensions: + - name: 'invalidExtensionVal' + value: true + parameters: + - name: id + required: true + in: query + description: ID of the booking + schema: + type: integer + responses: + 200: + description: booking retrieved + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Booking' + 404: + description: No bookings found for the user. + /bookings/{id}: + get: + tags: + - bookings + summary: Get a booking with ID + operationId: getBooking + parameters: + - name: id + required: true + in: path + description: ID of the booking + schema: + type: integer + responses: + 200: + description: booking retrieved + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Booking' + 404: + description: No bookings found for the user. + servers: + - url: localhost:9080/oas3-airlines/bookings/{id} + description: view of all the bookings for this user + variables: + id: + default: "1" + description: id of the review + put: + tags: + - bookings + summary: Update a booking with ID + operationId: updateBooking + parameters: + - name: id + in: path + description: ID of the booking + required: true + schema: + type: integer + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Booking' + responses: + 200: + description: Booking updated + 404: + description: Booking not found + delete: + tags: + - bookings + summary: Delete a booking with ID + operationId: deleteBooking + parameters: + - name: id + in: path + required: true + schema: + type: integer + responses: + 200: + description: Booking deleted successfully. + 404: + description: Booking not found. + /reviews: + get: + tags: + - reviews + summary: get all the reviews + operationId: getReview + responses: + 200: + description: successful operation + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Review' + servers: + - url: localhost:9080/oas3-airlines/reviews + description: endpoint for all the review related methods + post: + tags: + - reviews + summary: Create a Review + operationId: createReview + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Review' + description: example review to add + required: true + responses: + 201: + description: review created + content: + application/json: + schema: + type: string + description: id of the new review + callbacks: + testCallback: + http://localhost:9080/oas3-airlines/reviews: {} + security: + - reviewoauth2: + - write:reviews + servers: + - url: localhost:9080/oas3-airlines/reviews/{id} + description: view of all the reviews + variables: + id: + description: id of the review + default: "1" + /reviews/{id}: + get: + tags: + - reviews + summary: Get a review with ID + operationId: getReviewById + parameters: + - name: id + in: path + description: ID of the booking + required: true + content: + '*/*': + schema: + type: integer + responses: + 200: + description: Review retrieved + content: + application/json: + schema: + $ref: '#/components/schemas/Review' + 404: + description: Review not found + servers: + - url: localhost:9080/oas3-airlines/reviews/{id} + description: endpoint for all the review related methods + variables: + id: + default: "11" + description: id of the review + delete: + tags: + - reviews + summary: Delete a Review with ID + operationId: deleteReview + parameters: + - name: id + in: path + required: true + schema: + type: integer + responses: + 200: + description: Review deleted + 404: + description: Review not found + /reviews/{user}: + get: + tags: + - reviews + summary: Get all reviews by user + operationId: getReviewByUser + parameters: + - name: user + in: path + description: username of the user for the reviews + required: true + content: + '*/*': + schema: + type: string + examples: + ? + : value: bsmith + responses: + 200: + description: Review(s) retrieved + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/Review' + - $ref: '#/components/schemas/User' + discriminator: + mapping: + review: '#/components/schemas/Review' + user: '#/components/schemas/User' + 404: + description: Review(s) not found + /reviews/{airline}: + get: + tags: + - reviews + summary: Get all reviews by airlines + operationId: getReviewByAirline + parameters: + - name: airline + in: path + description: name of the airlines for the reviews + required: true + content: + '*/*': + schema: + type: string + examples: + ? + : value: Acme Air + responses: + 200: + description: Review(s) retrieved + content: + application/json: + schema: + $ref: '#/components/schemas/Review' + 404: + description: Review(s) not found + /reviews/{user}/{airlines}: + get: + tags: + - reviews + summary: Get all reviews for an airline by User + operationId: getReviewByAirlineAndUser + parameters: + - name: user + in: path + required: true + schema: + type: string + - name: airlines + in: path + required: true + schema: + type: string + responses: + 200: + description: Review(s) retrieved + content: + application/json: + schema: + $ref: '#/components/schemas/Review' + 404: + description: Review(s) not found +components: + schemas: + User: + required: + - age + - email + - firstName + - lastName + - password + - phone + - sex + type: object + properties: + password: + type: string + example: bobSm37 + firstName: + type: string + example: Bob + lastName: + type: string + example: Smith + sex: + type: string + example: M + age: + type: integer + example: 37 + email: + type: string + example: bob@test.ca + phone: + type: string + example: 123-456-7890 + id: + type: integer + username: + type: string + status: + title: User Status + type: integer + Airline: + required: + - contactPhone + - name + type: object + properties: + name: + type: string + example: Acme Air + contactPhone: + type: string + example: 1-888-1234-567 + Flight: + required: + - airportFrom + - airportTo + - dateTime + - number + - price + - status + type: object + properties: + airline: + $ref: '#/components/schemas/Airline' + dateTime: + pattern: dateTime + type: string + example: 2016-03-05 18:00 + number: + type: string + example: AC190 + status: + type: string + example: On Schedule + airportFrom: + type: string + example: YYZ + airportTo: + type: string + example: LAX + price: + type: string + example: US$350 + Booking: + required: + - airMiles + - seatPreference + type: object + properties: + departtureFlight: + $ref: '#/components/schemas/Flight' + returningFlight: + $ref: '#/components/schemas/Flight' + creditCard: + $ref: '#/components/schemas/CreditCard' + airMiles: + type: string + example: 32126319 + seatPreference: + type: string + example: window + Review: + required: + - id + - rating + type: object + properties: + id: + type: string + example: 0 + user: + $ref: '#/components/schemas/User' + airlines: + $ref: '#/components/schemas/Airline' + rating: + type: integer + example: 8 + comment: + type: string + example: Great service! + CreditCard: + required: + - cardNumber + - cardholderName + - cvv + - expiryDate + - issuer + type: object + properties: + issuer: + type: string + example: VISA + cardholderName: + type: string + example: Joe Smith + cardNumber: + type: string + example: '**********1234' + cvv: + type: string + example: "0322" + expiryDate: + type: string + example: 04/19 + securitySchemes: + reviewoauth2: + type: oauth2 + description: authentication needed to create and delete reviews + flows: + implicit: + authorizationUrl: https://example.com/api/oauth/dialog + scopes: + write:reviews: create a review diff --git a/dev/io.openliberty.microprofile.openapi.4.0.internal_fat/publish/servers/OpenAPIValidationServer/bootstrap.properties b/dev/io.openliberty.microprofile.openapi.4.0.internal_fat/publish/servers/OpenAPIValidationServer/bootstrap.properties new file mode 100644 index 000000000000..25dde95fb6c5 --- /dev/null +++ b/dev/io.openliberty.microprofile.openapi.4.0.internal_fat/publish/servers/OpenAPIValidationServer/bootstrap.properties @@ -0,0 +1,2 @@ +bootstrap.include=../testports.properties +com.ibm.ws.logging.trace.specification=*=info=enabled:mpOpenAPI=debug \ No newline at end of file diff --git a/dev/io.openliberty.microprofile.openapi.4.0.internal_fat/publish/servers/OpenAPIValidationServer/server.xml b/dev/io.openliberty.microprofile.openapi.4.0.internal_fat/publish/servers/OpenAPIValidationServer/server.xml new file mode 100644 index 000000000000..76b2a5ccaf52 --- /dev/null +++ b/dev/io.openliberty.microprofile.openapi.4.0.internal_fat/publish/servers/OpenAPIValidationServer/server.xml @@ -0,0 +1,13 @@ + + + + + mpOpenAPI-4.0 + componenttest-2.0 + restfulWS-3.1 + mpConfig-3.1 + + + + + \ No newline at end of file