├── .circleci └── config.yml ├── .clang-format ├── .gitattributes ├── .gitignore ├── .gitmodules ├── ARCHITECTURE.md ├── CHANGELOG.md ├── CMakeLists.txt ├── CTestConfig.cmake ├── DefaultBuildType.cmake ├── Dockerfile ├── Gemfile ├── Gemfile.lock ├── LICENSE ├── Makefile ├── README.md ├── THIRD_PARTY_LICENSES.txt ├── appveyor.yml ├── cmake ├── unix-asan.cmake ├── unix-coverage.cmake ├── unix-ubsan.cmake ├── unix.cmake └── win_release.cmake ├── common.gypi ├── configure ├── drafter.gyp ├── features ├── fixtures │ ├── blueprint.apib │ ├── invalid_blueprint.apib │ ├── refract.json │ ├── refract.sourcemap.json │ ├── refract.sourcemap.yaml │ └── refract.yaml ├── parse.feature ├── sourcemap.feature ├── step_definitions │ └── file_content_step.rb ├── support │ ├── aruba_config.rb │ ├── env.rb │ └── setup.rb ├── validate.feature └── version.feature ├── packages ├── apib-parser │ ├── CMakeLists.txt │ ├── apib-parser-config.cmake │ ├── include │ │ └── apib │ │ │ └── parser │ │ │ └── MediaTypeParser.h │ ├── src │ │ ├── MediaTypeParser.cc │ │ ├── grammar │ │ │ ├── Mediatype.cc │ │ │ ├── Mediatype.h │ │ │ ├── Uritemplate.h │ │ │ └── recover.h │ │ ├── markdown-parser │ │ │ ├── ByteBuffer.cc │ │ │ ├── ByteBuffer.h │ │ │ ├── MarkdownNode.cc │ │ │ ├── MarkdownNode.h │ │ │ ├── MarkdownParser.cc │ │ │ ├── MarkdownParser.h │ │ │ └── README.md │ │ └── snowcrash │ │ │ ├── ActionParser.h │ │ │ ├── AssetParser.h │ │ │ ├── AttributesParser.h │ │ │ ├── Blueprint.cc │ │ │ ├── Blueprint.h │ │ │ ├── BlueprintParser.h │ │ │ ├── BlueprintSourcemap.cc │ │ │ ├── BlueprintSourcemap.h │ │ │ ├── BlueprintUtility.h │ │ │ ├── CodeBlockUtility.h │ │ │ ├── DataStructureGroupParser.h │ │ │ ├── HTTP.cc │ │ │ ├── HTTP.h │ │ │ ├── HeadersParser.cc │ │ │ ├── HeadersParser.h │ │ │ ├── Just.h │ │ │ ├── MSON.cc │ │ │ ├── MSON.h │ │ │ ├── MSONMixinParser.h │ │ │ ├── MSONNamedTypeParser.h │ │ │ ├── MSONOneOfParser.cc │ │ │ ├── MSONOneOfParser.h │ │ │ ├── MSONParameterParser.h │ │ │ ├── MSONPropertyMemberParser.h │ │ │ ├── MSONSourcemap.cc │ │ │ ├── MSONSourcemap.h │ │ │ ├── MSONTypeSectionParser.cc │ │ │ ├── MSONTypeSectionParser.h │ │ │ ├── MSONUtility.h │ │ │ ├── MSONValueMemberParser.cc │ │ │ ├── MSONValueMemberParser.h │ │ │ ├── ModelTable.h │ │ │ ├── ParameterParser.h │ │ │ ├── ParametersParser.h │ │ │ ├── PayloadParser.h │ │ │ ├── Platform.h │ │ │ ├── README.md │ │ │ ├── RegexMatch.h │ │ │ ├── RelationParser.h │ │ │ ├── ResourceGroupParser.h │ │ │ ├── ResourceParser.h │ │ │ ├── Section.cc │ │ │ ├── Section.h │ │ │ ├── SectionParser.h │ │ │ ├── SectionParserData.h │ │ │ ├── SectionProcessor.h │ │ │ ├── Signature.cc │ │ │ ├── Signature.h │ │ │ ├── SignatureSectionProcessor.h │ │ │ ├── SourceAnnotation.h │ │ │ ├── StringUtility.h │ │ │ ├── UriTemplateParser.cc │ │ │ ├── UriTemplateParser.h │ │ │ ├── ValuesParser.h │ │ │ ├── posix │ │ │ └── RegexMatch.cc │ │ │ ├── snowcrash.cc │ │ │ ├── snowcrash.h │ │ │ └── win │ │ │ └── RegexMatch.cc │ └── test │ │ ├── CMakeLists.txt │ │ ├── grammar │ │ ├── test-MediaType.cc │ │ ├── test-Recover.cc │ │ └── test-UriTemplate.cc │ │ ├── markdown-parser │ │ ├── test-ByteBuffer.cc │ │ └── test-MarkdownParser.cc │ │ ├── snowcrash │ │ ├── README.md │ │ ├── performance │ │ │ ├── fixtures │ │ │ │ ├── fixture-1.apib │ │ │ │ ├── fixture-2.apib │ │ │ │ ├── fixture-3.apib │ │ │ │ └── fixture-4.apib │ │ │ └── perf-snowcrash.cc │ │ ├── snowcrashtest.h │ │ ├── test-ActionParser.cc │ │ ├── test-AssetParser.cc │ │ ├── test-AttributesParser.cc │ │ ├── test-Blueprint.cc │ │ ├── test-BlueprintParser.cc │ │ ├── test-BlueprintUtility.cc │ │ ├── test-DataStructureGroupParser.cc │ │ ├── test-HeadersParser.cc │ │ ├── test-Indentation.cc │ │ ├── test-MSONMixinParser.cc │ │ ├── test-MSONNamedTypeParser.cc │ │ ├── test-MSONOneOfParser.cc │ │ ├── test-MSONParameterParser.cc │ │ ├── test-MSONPropertyMemberParser.cc │ │ ├── test-MSONTypeSectionParser.cc │ │ ├── test-MSONUtility.cc │ │ ├── test-MSONValueMemberParser.cc │ │ ├── test-ModelTable.cc │ │ ├── test-ParameterParser.cc │ │ ├── test-ParametersParser.cc │ │ ├── test-PayloadParser.cc │ │ ├── test-RegexMatch.cc │ │ ├── test-RelationParser.cc │ │ ├── test-ResourceGroupParser.cc │ │ ├── test-ResourceParser.cc │ │ ├── test-SectionParser.cc │ │ ├── test-Signature.cc │ │ ├── test-StringUtility.cc │ │ ├── test-SymbolIdentifier.cc │ │ ├── test-UriTemplateParser.cc │ │ ├── test-ValuesParser.cc │ │ ├── test-Warnings.cc │ │ ├── test-csnowcrash.cc │ │ └── test-snowcrash.cc │ │ └── test-apib_parser.cc ├── apib │ ├── CMakeLists.txt │ ├── apib-config.cmake │ ├── include │ │ └── apib │ │ │ └── syntax │ │ │ └── MediaType.h │ ├── src │ │ └── MediaType.cc │ └── test │ │ ├── CMakeLists.txt │ │ ├── test-MediaType.cc │ │ └── test-apib.cc ├── boost │ ├── BoostContainerConfig.cmake │ ├── CMakeLists.txt │ ├── LICENSE_1_0.txt │ ├── VERSION.txt │ └── boost │ │ ├── assert.hpp │ │ ├── config.hpp │ │ ├── config │ │ ├── abi │ │ │ ├── borland_prefix.hpp │ │ │ ├── borland_suffix.hpp │ │ │ ├── msvc_prefix.hpp │ │ │ └── msvc_suffix.hpp │ │ ├── abi_prefix.hpp │ │ ├── abi_suffix.hpp │ │ ├── assert_cxx03.hpp │ │ ├── assert_cxx11.hpp │ │ ├── assert_cxx14.hpp │ │ ├── assert_cxx17.hpp │ │ ├── assert_cxx20.hpp │ │ ├── assert_cxx98.hpp │ │ ├── auto_link.hpp │ │ ├── compiler │ │ │ ├── borland.hpp │ │ │ ├── clang.hpp │ │ │ ├── clang_version.hpp │ │ │ ├── codegear.hpp │ │ │ ├── comeau.hpp │ │ │ ├── common_edg.hpp │ │ │ ├── compaq_cxx.hpp │ │ │ ├── cray.hpp │ │ │ ├── diab.hpp │ │ │ ├── digitalmars.hpp │ │ │ ├── gcc.hpp │ │ │ ├── gcc_xml.hpp │ │ │ ├── greenhills.hpp │ │ │ ├── hp_acc.hpp │ │ │ ├── intel.hpp │ │ │ ├── kai.hpp │ │ │ ├── metrowerks.hpp │ │ │ ├── mpw.hpp │ │ │ ├── nvcc.hpp │ │ │ ├── pathscale.hpp │ │ │ ├── pgi.hpp │ │ │ ├── sgi_mipspro.hpp │ │ │ ├── sunpro_cc.hpp │ │ │ ├── vacpp.hpp │ │ │ ├── visualc.hpp │ │ │ ├── xlcpp.hpp │ │ │ └── xlcpp_zos.hpp │ │ ├── detail │ │ │ ├── cxx_composite.hpp │ │ │ ├── posix_features.hpp │ │ │ ├── select_compiler_config.hpp │ │ │ ├── select_platform_config.hpp │ │ │ ├── select_stdlib_config.hpp │ │ │ └── suffix.hpp │ │ ├── header_deprecated.hpp │ │ ├── helper_macros.hpp │ │ ├── no_tr1 │ │ │ ├── cmath.hpp │ │ │ ├── complex.hpp │ │ │ ├── functional.hpp │ │ │ ├── memory.hpp │ │ │ └── utility.hpp │ │ ├── platform │ │ │ ├── aix.hpp │ │ │ ├── amigaos.hpp │ │ │ ├── beos.hpp │ │ │ ├── bsd.hpp │ │ │ ├── cloudabi.hpp │ │ │ ├── cray.hpp │ │ │ ├── cygwin.hpp │ │ │ ├── haiku.hpp │ │ │ ├── hpux.hpp │ │ │ ├── irix.hpp │ │ │ ├── linux.hpp │ │ │ ├── macos.hpp │ │ │ ├── qnxnto.hpp │ │ │ ├── solaris.hpp │ │ │ ├── symbian.hpp │ │ │ ├── vms.hpp │ │ │ ├── vxworks.hpp │ │ │ ├── wasm.hpp │ │ │ ├── win32.hpp │ │ │ └── zos.hpp │ │ ├── pragma_message.hpp │ │ ├── requires_threads.hpp │ │ ├── stdlib │ │ │ ├── dinkumware.hpp │ │ │ ├── libcomo.hpp │ │ │ ├── libcpp.hpp │ │ │ ├── libstdcpp3.hpp │ │ │ ├── modena.hpp │ │ │ ├── msl.hpp │ │ │ ├── roguewave.hpp │ │ │ ├── sgi.hpp │ │ │ ├── stlport.hpp │ │ │ ├── vacpp.hpp │ │ │ └── xlcpp_zos.hpp │ │ ├── user.hpp │ │ ├── warning_disable.hpp │ │ └── workaround.hpp │ │ ├── container │ │ ├── allocator_traits.hpp │ │ ├── container_fwd.hpp │ │ ├── detail │ │ │ ├── advanced_insert_int.hpp │ │ │ ├── algorithm.hpp │ │ │ ├── alloc_helpers.hpp │ │ │ ├── allocation_type.hpp │ │ │ ├── config_begin.hpp │ │ │ ├── config_end.hpp │ │ │ ├── construct_in_place.hpp │ │ │ ├── copy_move_algo.hpp │ │ │ ├── destroyers.hpp │ │ │ ├── iterator.hpp │ │ │ ├── iterators.hpp │ │ │ ├── min_max.hpp │ │ │ ├── mpl.hpp │ │ │ ├── next_capacity.hpp │ │ │ ├── placement_new.hpp │ │ │ ├── std_fwd.hpp │ │ │ ├── type_traits.hpp │ │ │ ├── value_functors.hpp │ │ │ ├── value_init.hpp │ │ │ ├── variadic_templates_tools.hpp │ │ │ ├── version_type.hpp │ │ │ └── workaround.hpp │ │ ├── new_allocator.hpp │ │ ├── options.hpp │ │ ├── throw_exception.hpp │ │ └── vector.hpp │ │ ├── cstdint.hpp │ │ ├── current_function.hpp │ │ ├── detail │ │ └── workaround.hpp │ │ ├── intrusive │ │ ├── detail │ │ │ ├── algorithm.hpp │ │ │ ├── config_begin.hpp │ │ │ ├── config_end.hpp │ │ │ ├── has_member_function_callable_with.hpp │ │ │ ├── iterator.hpp │ │ │ ├── mpl.hpp │ │ │ ├── reverse_iterator.hpp │ │ │ ├── std_fwd.hpp │ │ │ ├── value_functors.hpp │ │ │ └── workaround.hpp │ │ ├── pack_options.hpp │ │ ├── pointer_rebind.hpp │ │ └── pointer_traits.hpp │ │ ├── limits.hpp │ │ ├── move │ │ ├── adl_move_swap.hpp │ │ ├── algo │ │ │ ├── adaptive_merge.hpp │ │ │ ├── detail │ │ │ │ ├── adaptive_sort_merge.hpp │ │ │ │ ├── basic_op.hpp │ │ │ │ ├── heap_sort.hpp │ │ │ │ ├── insertion_sort.hpp │ │ │ │ ├── is_sorted.hpp │ │ │ │ ├── merge.hpp │ │ │ │ ├── merge_sort.hpp │ │ │ │ ├── search.hpp │ │ │ │ └── set_difference.hpp │ │ │ ├── move.hpp │ │ │ ├── predicate.hpp │ │ │ └── unique.hpp │ │ ├── core.hpp │ │ ├── detail │ │ │ ├── addressof.hpp │ │ │ ├── config_begin.hpp │ │ │ ├── config_end.hpp │ │ │ ├── destruct_n.hpp │ │ │ ├── force_ptr.hpp │ │ │ ├── fwd_macros.hpp │ │ │ ├── iterator_to_raw_pointer.hpp │ │ │ ├── iterator_traits.hpp │ │ │ ├── meta_utils.hpp │ │ │ ├── meta_utils_core.hpp │ │ │ ├── move_helpers.hpp │ │ │ ├── placement_new.hpp │ │ │ ├── pointer_element.hpp │ │ │ ├── reverse_iterator.hpp │ │ │ ├── std_ns_begin.hpp │ │ │ ├── std_ns_end.hpp │ │ │ ├── to_raw_pointer.hpp │ │ │ ├── type_traits.hpp │ │ │ └── workaround.hpp │ │ ├── iterator.hpp │ │ ├── traits.hpp │ │ └── utility_core.hpp │ │ ├── static_assert.hpp │ │ └── version.hpp └── drafter │ ├── CMakeLists.txt │ ├── drafter-config.cmake │ ├── integration.cmake │ ├── src │ ├── ConversionContext.cc │ ├── ConversionContext.h │ ├── ElementComparator.h │ ├── ElementData.h │ ├── ElementInfoUtils.h │ ├── MsonMemberToApie.h │ ├── MsonOneOfSectionToApie.cc │ ├── MsonOneOfSectionToApie.h │ ├── MsonTypeSectionToApie.cc │ ├── MsonTypeSectionToApie.h │ ├── NamedTypesRegistry.cc │ ├── NamedTypesRegistry.h │ ├── NodeInfo.h │ ├── RefractAPI.cc │ ├── RefractAPI.h │ ├── RefractDataStructure.cc │ ├── RefractDataStructure.h │ ├── RefractElementFactory.cc │ ├── RefractElementFactory.h │ ├── RefractSourceMap.cc │ ├── RefractSourceMap.h │ ├── Render.cc │ ├── Render.h │ ├── Serialize.cc │ ├── Serialize.h │ ├── SerializeKey.cc │ ├── SerializeKey.h │ ├── SerializeResult.cc │ ├── SerializeResult.h │ ├── SourceMapUtils.cc │ ├── SourceMapUtils.h │ ├── Version.h.in │ ├── backend │ │ ├── Backend.h │ │ ├── MediaTypeS11n.cc │ │ └── MediaTypeS11n.h │ ├── config.cc │ ├── config.h │ ├── drafter.cc │ ├── drafter.h │ ├── main.cc │ ├── options.cc │ ├── options.h │ ├── refract │ │ ├── Build.h │ │ ├── Cardinal.h │ │ ├── ComparableVisitor.cc │ │ ├── ComparableVisitor.h │ │ ├── Element.cc │ │ ├── Element.h │ │ ├── ElementFwd.h │ │ ├── ElementIfc.h │ │ ├── ElementSize.cc │ │ ├── ElementSize.h │ │ ├── ElementUtils.cc │ │ ├── ElementUtils.h │ │ ├── Exception.h │ │ ├── ExpandVisitor.cc │ │ ├── ExpandVisitor.h │ │ ├── FilterVisitor.h │ │ ├── InfoElements.cc │ │ ├── InfoElements.h │ │ ├── InfoElementsUtils.h │ │ ├── IsExpandableVisitor.cc │ │ ├── IsExpandableVisitor.h │ │ ├── Iterate.h │ │ ├── JsonSchema.cc │ │ ├── JsonSchema.h │ │ ├── JsonUtils.cc │ │ ├── JsonUtils.h │ │ ├── JsonValue.cc │ │ ├── JsonValue.h │ │ ├── PrintVisitor.cc │ │ ├── PrintVisitor.h │ │ ├── Query.cc │ │ ├── Query.h │ │ ├── Registry.cc │ │ ├── Registry.h │ │ ├── SerializeSo.cc │ │ ├── SerializeSo.h │ │ ├── TypeQueryVisitor.cc │ │ ├── TypeQueryVisitor.h │ │ ├── Utils.cc │ │ ├── Utils.h │ │ ├── Visitor.h │ │ ├── VisitorUtils.cc │ │ ├── VisitorUtils.h │ │ └── dsd │ │ │ ├── Array.cc │ │ │ ├── Array.h │ │ │ ├── Bool.cc │ │ │ ├── Bool.h │ │ │ ├── ElementData.h │ │ │ ├── Enum.cc │ │ │ ├── Enum.h │ │ │ ├── Extend.cc │ │ │ ├── Extend.h │ │ │ ├── Holder.cc │ │ │ ├── Holder.h │ │ │ ├── Member.cc │ │ │ ├── Member.h │ │ │ ├── Null.cc │ │ │ ├── Null.h │ │ │ ├── Number.cc │ │ │ ├── Number.h │ │ │ ├── Object.cc │ │ │ ├── Object.h │ │ │ ├── Option.cc │ │ │ ├── Option.h │ │ │ ├── Ref.cc │ │ │ ├── Ref.h │ │ │ ├── Select.cc │ │ │ ├── Select.h │ │ │ ├── String.cc │ │ │ ├── String.h │ │ │ ├── Traits.h │ │ │ └── Utils.h │ ├── reporting.cc │ ├── reporting.h │ ├── stream.h │ └── utils │ │ ├── Utf8.h │ │ ├── Utils.h │ │ ├── log │ │ ├── Trivial.cc │ │ └── Trivial.h │ │ └── so │ │ ├── JsonIo.cc │ │ ├── JsonIo.h │ │ ├── Value.cc │ │ ├── Value.h │ │ ├── YamlIo.cc │ │ └── YamlIo.h │ └── test │ ├── CMakeLists.txt │ ├── backend │ └── test-MediaTypeS11.cc │ ├── ctesting.c │ ├── ctesting.h │ ├── draftertest.cc │ ├── draftertest.h │ ├── fixtures │ ├── api │ │ ├── action-attributes.apib │ │ ├── action-attributes.json │ │ ├── action-attributes.sourcemap.json │ │ ├── action-parameters.apib │ │ ├── action-parameters.json │ │ ├── action-parameters.sourcemap.json │ │ ├── action-request-attributes.apib │ │ ├── action-request-attributes.json │ │ ├── action-request-attributes.sourcemap.json │ │ ├── action.apib │ │ ├── action.json │ │ ├── action.sourcemap.json │ │ ├── advanced-action.apib │ │ ├── advanced-action.json │ │ ├── advanced-action.sourcemap.json │ │ ├── asset.apib │ │ ├── asset.json │ │ ├── asset.sourcemap.json │ │ ├── attributes-array-nested-named-type.apib │ │ ├── attributes-array-nested-named-type.json │ │ ├── attributes-named-type-enum-reference.apib │ │ ├── attributes-named-type-enum-reference.json │ │ ├── attributes-named-type-member-reference.apib │ │ ├── attributes-named-type-member-reference.json │ │ ├── attributes-named-type-mixin.apib │ │ ├── attributes-named-type-mixin.json │ │ ├── attributes-references.apib │ │ ├── attributes-references.json │ │ ├── attributes-references.sourcemap.json │ │ ├── data-structure.apib │ │ ├── data-structure.json │ │ ├── data-structure.sourcemap.json │ │ ├── description.apib │ │ ├── description.json │ │ ├── description.sourcemap.json │ │ ├── headers.apib │ │ ├── headers.json │ │ ├── headers.sourcemap.json │ │ ├── issue-386.apib │ │ ├── issue-386.sourcemap.json │ │ ├── issue-702.apib │ │ ├── issue-702.json │ │ ├── issue-741.apib │ │ ├── issue-741.json │ │ ├── metadata.apib │ │ ├── metadata.json │ │ ├── metadata.sourcemap.json │ │ ├── mixin-inheritance.apib │ │ ├── mixin-inheritance.json │ │ ├── mson.apib │ │ ├── mson.json │ │ ├── mson.sourcemap.json │ │ ├── payload-attributes.apib │ │ ├── payload-attributes.json │ │ ├── payload-attributes.sourcemap.json │ │ ├── relation.apib │ │ ├── relation.json │ │ ├── relation.sourcemap.json │ │ ├── request-only.apib │ │ ├── request-only.json │ │ ├── request-only.sourcemap.json │ │ ├── request-parameters.apib │ │ ├── request-parameters.json │ │ ├── request-parameters.sourcemap.json │ │ ├── resource-attributes.apib │ │ ├── resource-attributes.json │ │ ├── resource-attributes.sourcemap.json │ │ ├── resource-group.apib │ │ ├── resource-group.json │ │ ├── resource-group.sourcemap.json │ │ ├── resource-parameters.apib │ │ ├── resource-parameters.json │ │ ├── resource-parameters.sourcemap.json │ │ ├── resource.apib │ │ ├── resource.json │ │ ├── resource.sourcemap.json │ │ ├── schema-body.apib │ │ ├── schema-body.json │ │ ├── schema-body.sourcemap.json │ │ ├── schema-custom-json.apib │ │ ├── schema-custom-json.json │ │ ├── schema-custom.apib │ │ ├── schema-custom.json │ │ ├── schema-custom.sourcemap.json │ │ ├── transaction.apib │ │ ├── transaction.json │ │ ├── transaction.sourcemap.json │ │ ├── xml-body.apib │ │ ├── xml-body.json │ │ └── xml-body.sourcemap.json │ ├── circular │ │ ├── array-in-object.apib │ │ ├── array-in-object.json │ │ ├── array.apib │ │ ├── array.json │ │ ├── cross.apib │ │ ├── cross.json │ │ ├── embed.apib │ │ ├── embed.json │ │ ├── enum.apib │ │ ├── enum.json │ │ ├── mixed.apib │ │ ├── mixed.json │ │ ├── mixin-cross.apib │ │ ├── mixin-cross.json │ │ ├── mixin-embed.apib │ │ ├── mixin-embed.json │ │ ├── mixin-identity.apib │ │ ├── mixin-identity.json │ │ ├── mixin-member.apib │ │ ├── mixin-member.json │ │ ├── nested-enum.json │ │ ├── simple.apib │ │ └── simple.json │ ├── extend │ │ ├── circular.apib │ │ ├── circular.json │ │ ├── complex.apib │ │ ├── complex.json │ │ ├── many.apib │ │ └── many.json │ ├── mson │ │ ├── array-reference.apib │ │ ├── array-reference.json │ │ ├── array-sample.apib │ │ ├── array-sample.json │ │ ├── array-typed-content.apib │ │ ├── array-typed-content.json │ │ ├── check-bool-number-value-validity.apib │ │ ├── check-bool-number-value-validity.json │ │ ├── check-default-without-value.apib │ │ ├── check-default-without-value.json │ │ ├── check-sample-without-value.apib │ │ ├── check-sample-without-value.json │ │ ├── empty-sample.apib │ │ ├── empty-sample.json │ │ ├── enum-empty-default.apib │ │ ├── enum-empty-default.json │ │ ├── enum-members-description.apib │ │ ├── enum-members-description.json │ │ ├── enum-multiple-default.apib │ │ ├── enum-multiple-default.json │ │ ├── enum-sample.apib │ │ ├── enum-sample.json │ │ ├── enum-variants.apib │ │ ├── enum-variants.json │ │ ├── enum.apib │ │ ├── enum.json │ │ ├── enumerations.apib │ │ ├── enumerations.json │ │ ├── fixed-type-array-primitive-nested.apib │ │ ├── fixed-type-array-primitive-nested.json │ │ ├── group.apib │ │ ├── group.json │ │ ├── inheritance-primitive.apib │ │ ├── inheritance-primitive.json │ │ ├── inheritance.apib │ │ ├── inheritance.json │ │ ├── inner-inheritance.apib │ │ ├── inner-inheritance.json │ │ ├── issue-682-b.apib │ │ ├── issue-682-b.json │ │ ├── issue-682.apib │ │ ├── issue-682.json │ │ ├── issue-689.apib │ │ ├── issue-689.json │ │ ├── issue-699.apib │ │ ├── issue-699.json │ │ ├── issue-709-b.apib │ │ ├── issue-709-b.json │ │ ├── issue-709.apib │ │ ├── issue-709.json │ │ ├── issue-713.apib │ │ ├── issue-713.json │ │ ├── issue-718.apib │ │ ├── issue-718.json │ │ ├── issue-749-1.apib │ │ ├── issue-749-1.json │ │ ├── issue-749-2.apib │ │ ├── issue-749-2.json │ │ ├── issue-752.apib │ │ ├── issue-752.json │ │ ├── mixin-nonexistent.apib │ │ ├── mixin-nonexistent.json │ │ ├── mixin.apib │ │ ├── mixin.json │ │ ├── multiline-description.apib │ │ ├── multiline-description.json │ │ ├── multiple-default.apib │ │ ├── multiple-default.json │ │ ├── named-with-types.apib │ │ ├── named-with-types.json │ │ ├── nontyped-array-sample.apib │ │ ├── nontyped-array-sample.json │ │ ├── nontyped-array.apib │ │ ├── nontyped-array.json │ │ ├── nontyped-object.apib │ │ ├── nontyped-object.json │ │ ├── number-wrong-value.apib │ │ ├── number-wrong-value.json │ │ ├── object-sample.apib │ │ ├── object-sample.json │ │ ├── oneof-sample.apib │ │ ├── oneof-sample.json │ │ ├── oneof.apib │ │ ├── oneof.json │ │ ├── primitive-variables.apib │ │ ├── primitive-variables.json │ │ ├── primitive-with-members.apib │ │ ├── primitive-with-members.json │ │ ├── primitives.apib │ │ ├── primitives.json │ │ ├── reference-override.apib │ │ ├── reference-override.json │ │ ├── regression-207.apib │ │ ├── regression-207.json │ │ ├── regression-267.apib │ │ ├── regression-267.json │ │ ├── regression-269.apib │ │ ├── regression-269.json │ │ ├── resource-anonymous.apib │ │ ├── resource-anonymous.json │ │ ├── resource-nested-inheritance.apib │ │ ├── resource-nested-inheritance.json │ │ ├── resource-nested-member.apib │ │ ├── resource-nested-member.json │ │ ├── resource-nested-mixin.apib │ │ ├── resource-nested-mixin.json │ │ ├── resource-primitive-mixin.apib │ │ ├── resource-primitive-mixin.json │ │ ├── resource-resolve-basetype.apib │ │ ├── resource-resolve-basetype.json │ │ ├── resource-unresolved-reference.apib │ │ ├── resource-unresolved-reference.json │ │ ├── string-sample.apib │ │ ├── string-sample.json │ │ ├── type-attributes-payload.apib │ │ ├── type-attributes-payload.json │ │ ├── type-attributes-payload.sourcemap.json │ │ ├── type-attributes.apib │ │ ├── type-attributes.json │ │ ├── type-attributes.sourcemap.json │ │ ├── typed-array-sample.apib │ │ ├── typed-array-sample.json │ │ ├── typed-array.apib │ │ ├── typed-array.json │ │ ├── typed-object.apib │ │ ├── typed-object.json │ │ ├── variable-property-name.apib │ │ └── variable-property-name.json │ ├── oneof │ │ ├── expanded.apib │ │ ├── expanded.json │ │ ├── multi-oneof.apib │ │ ├── multi-oneof.json │ │ ├── multi-properties.apib │ │ ├── multi-properties.json │ │ ├── object.apib │ │ ├── object.json │ │ ├── required.apib │ │ ├── required.json │ │ ├── required2.apib │ │ ├── required2.json │ │ ├── simple.apib │ │ └── simple.json │ ├── parse-result │ │ ├── blueprint.apib │ │ ├── blueprint.json │ │ ├── blueprint.sourcemap.json │ │ ├── error-warning.apib │ │ ├── error-warning.json │ │ ├── error-warning.sourcemap.json │ │ ├── error.apib │ │ ├── error.json │ │ ├── error.sourcemap.json │ │ ├── mson.apib │ │ ├── mson.json │ │ ├── mson.sourcemap.json │ │ ├── simple.apib │ │ ├── simple.json │ │ ├── simple.sourcemap.json │ │ ├── warning.apib │ │ ├── warning.json │ │ ├── warning.sourcemap.json │ │ ├── warnings.apib │ │ ├── warnings.json │ │ └── warnings.sourcemap.json │ ├── render │ │ ├── action-request-attributes.apib │ │ ├── action-request-attributes.json │ │ ├── array-fixed-values.apib │ │ ├── array-fixed-values.json │ │ ├── array-mixin.apib │ │ ├── array-mixin.json │ │ ├── array-nested-array.apib │ │ ├── array-nested-array.json │ │ ├── array-nested-object.apib │ │ ├── array-nested-object.json │ │ ├── array-ref-array.apib │ │ ├── array-ref-array.json │ │ ├── array-ref-object.apib │ │ ├── array-ref-object.json │ │ ├── array-samples.apib │ │ ├── array-samples.json │ │ ├── complex-object.apib │ │ ├── complex-object.json │ │ ├── content-type.apib │ │ ├── content-type.json │ │ ├── enum-default-multiple.apib │ │ ├── enum-default-multiple.json │ │ ├── enum-default.apib │ │ ├── enum-default.json │ │ ├── enum-sample.apib │ │ ├── enum-sample.json │ │ ├── fixed-attributes-section.apib │ │ ├── fixed-attributes-section.json │ │ ├── fixed-named-type.apib │ │ ├── fixed-named-type.json │ │ ├── inheritance-array-sample.apib │ │ ├── inheritance-array-sample.json │ │ ├── inheritance-object-sample.apib │ │ ├── inheritance-object-sample.json │ │ ├── issue-246.apib │ │ ├── issue-246.json │ │ ├── issue-312.apib │ │ ├── issue-312.json │ │ ├── issue-318.apib │ │ ├── issue-318.json │ │ ├── issue-328-1.apib │ │ ├── issue-328-1.json │ │ ├── issue-328-2.apib │ │ ├── issue-328-2.json │ │ ├── issue-547.apib │ │ ├── issue-547.json │ │ ├── issue-556.apib │ │ ├── issue-556.json │ │ ├── issue-566.apib │ │ ├── issue-566.json │ │ ├── mixin-array-sample.apib │ │ ├── mixin-array-sample.json │ │ ├── mixin-object-sample.apib │ │ ├── mixin-object-sample.json │ │ ├── mixin-override.apib │ │ ├── mixin-override.json │ │ ├── nested-object.apib │ │ ├── nested-object.json │ │ ├── nullable-samples.apib │ │ ├── nullable-samples.json │ │ ├── nullable.apib │ │ ├── nullable.json │ │ ├── numbers.apib │ │ ├── numbers.json │ │ ├── object-array-string.apib │ │ ├── object-array-string.json │ │ ├── object-mixin.apib │ │ ├── object-mixin.json │ │ ├── object-ref-object.apib │ │ ├── object-ref-object.json │ │ ├── object-samples.apib │ │ ├── object-samples.json │ │ ├── object-without-sample.apib │ │ ├── object-without-sample.json │ │ ├── override.apib │ │ ├── override.json │ │ ├── primitive-samples.apib │ │ ├── primitive-samples.json │ │ ├── simple-array.apib │ │ ├── simple-array.json │ │ ├── simple-object.apib │ │ └── simple-object.json │ ├── schema │ │ ├── array-fixed-inline-samples.apib │ │ ├── array-fixed-inline-samples.json │ │ ├── array-fixed-inline.apib │ │ ├── array-fixed-inline.json │ │ ├── array-fixed-samples-complex.apib │ │ ├── array-fixed-samples-complex.json │ │ ├── array-fixed-samples.apib │ │ ├── array-fixed-samples.json │ │ ├── array-fixed-type-attributes.apib │ │ ├── array-fixed-type-attributes.json │ │ ├── array-fixed-type-object.apib │ │ ├── array-fixed-type-object.json │ │ ├── array-fixed-type.apib │ │ ├── array-fixed-type.json │ │ ├── array-fixed-types-only.apib │ │ ├── array-fixed-types-only.json │ │ ├── array-fixed.apib │ │ ├── array-fixed.json │ │ ├── array-inline.apib │ │ ├── array-inline.json │ │ ├── array-of-arrays.apib │ │ ├── array-of-arrays.json │ │ ├── array-of-types-mixed-complex.apib │ │ ├── array-of-types-mixed-complex.json │ │ ├── array-of-types-mixed.apib │ │ ├── array-of-types-mixed.json │ │ ├── array-of-types-only.apib │ │ ├── array-of-types-only.json │ │ ├── array-of-types.apib │ │ ├── array-of-types.json │ │ ├── array-restricted-to-type.apib │ │ ├── array-restricted-to-type.json │ │ ├── array-restricted-to-types-complex.apib │ │ ├── array-restricted-to-types-complex.json │ │ ├── array-restricted-to-types.apib │ │ ├── array-restricted-to-types.json │ │ ├── array-simple.apib │ │ ├── array-simple.json │ │ ├── array-with-nested-type.apib │ │ ├── array-with-nested-type.json │ │ ├── array-with-nested-types.apib │ │ ├── array-with-nested-types.json │ │ ├── boolean-literal.apib │ │ ├── boolean-literal.json │ │ ├── boolean.apib │ │ ├── boolean.json │ │ ├── default-attribute.apib │ │ ├── default-attribute.json │ │ ├── default-sample.apib │ │ ├── default-sample.json │ │ ├── default-section.apib │ │ ├── default-section.json │ │ ├── description.apib │ │ ├── description.json │ │ ├── enum-containing-enum.apib │ │ ├── enum-containing-enum.json │ │ ├── enum-containing-object.apib │ │ ├── enum-containing-object.json │ │ ├── enum-containing-sample.apib │ │ ├── enum-containing-sample.json │ │ ├── enum-nullable.apib │ │ ├── enum-nullable.json │ │ ├── enum-of-strings.apib │ │ ├── enum-of-strings.json │ │ ├── enum-with-type.apib │ │ ├── enum-with-type.json │ │ ├── escaping.apib │ │ ├── escaping.json │ │ ├── issue-493-multiple-same-required.apib │ │ ├── issue-493-multiple-same-required.json │ │ ├── issue-664.apib │ │ ├── issue-664.json │ │ ├── issue-686.apib │ │ ├── issue-686.json │ │ ├── mixin-simple.apib │ │ ├── mixin-simple.json │ │ ├── number-literal.apib │ │ ├── number-literal.json │ │ ├── number.apib │ │ ├── number.json │ │ ├── object-complex.apib │ │ ├── object-complex.json │ │ ├── object-fixed-optional.apib │ │ ├── object-fixed-optional.json │ │ ├── object-fixed-type-named-type.apib │ │ ├── object-fixed-type-named-type.json │ │ ├── object-fixed-type-values.apib │ │ ├── object-fixed-type-values.json │ │ ├── object-fixed-type.apib │ │ ├── object-fixed-type.json │ │ ├── object-fixed-values.apib │ │ ├── object-fixed-values.json │ │ ├── object-fixed.apib │ │ ├── object-fixed.json │ │ ├── object-override.apib │ │ ├── object-override.json │ │ ├── object-simple.apib │ │ ├── object-simple.json │ │ ├── object-very-complex.apib │ │ ├── object-very-complex.json │ │ ├── one-of-complex.apib │ │ ├── one-of-complex.json │ │ ├── one-of-properties.apib │ │ ├── one-of-properties.json │ │ ├── one-of.apib │ │ ├── one-of.json │ │ ├── optional.apib │ │ ├── optional.json │ │ ├── required-array.apib │ │ ├── required-array.json │ │ ├── required-object.apib │ │ ├── required-object.json │ │ ├── required.apib │ │ ├── required.json │ │ ├── sample-complex.apib │ │ ├── sample-complex.json │ │ ├── sample-fixed.apib │ │ ├── sample-fixed.json │ │ ├── sample-inline-attribute.apib │ │ ├── sample-inline-attribute.json │ │ ├── sample-inline-variable.apib │ │ ├── sample-inline-variable.json │ │ ├── sample.apib │ │ ├── sample.json │ │ ├── string-literal.apib │ │ ├── string-literal.json │ │ ├── string.apib │ │ ├── string.json │ │ ├── variable-property-fixed-type.apib │ │ ├── variable-property-fixed-type.json │ │ ├── variable-property-fixed-type2.apib │ │ ├── variable-property-fixed-type2.json │ │ ├── variable-property.apib │ │ ├── variable-property.json │ │ ├── variable-property2.apib │ │ └── variable-property2.json │ ├── syntax │ │ ├── issue-350.apib │ │ ├── issue-350.json │ │ ├── issue-755.apib │ │ ├── issue-755.json │ │ ├── mixed-inheritance-and-mixin.apib │ │ ├── mixed-inheritance-and-mixin.json │ │ ├── undisclosed-listitem.apib │ │ └── undisclosed-listitem.json │ └── utf-8 │ │ ├── utf8_sequence_0-0x10ffff_assigned_including-unprintable-asis_unseparated.txt │ │ ├── utf8_sequence_0-0x10ffff_assigned_including-unprintable-asis_unseparated.txt.json │ │ ├── utf8_sequence_0-0x10ffff_assigned_including-unprintable-asis_unseparated.txt.yaml │ │ ├── utf8_sequence_0-0x10ffff_assigned_including-unprintable-replaced_unseparated.txt │ │ ├── utf8_sequence_0-0x10ffff_assigned_including-unprintable-replaced_unseparated.txt.json │ │ ├── utf8_sequence_0-0x10ffff_assigned_including-unprintable-replaced_unseparated.txt.yaml │ │ ├── utf8_sequence_0-0x10ffff_assigned_printable_unseparated.txt │ │ ├── utf8_sequence_0-0x10ffff_assigned_printable_unseparated.txt.json │ │ ├── utf8_sequence_0-0x10ffff_assigned_printable_unseparated.txt.yaml │ │ ├── utf8_sequence_0-0x10ffff_including-unassigned_including-unprintable-asis_unseparated.txt │ │ ├── utf8_sequence_0-0x10ffff_including-unassigned_including-unprintable-asis_unseparated.txt.json │ │ ├── utf8_sequence_0-0x10ffff_including-unassigned_including-unprintable-asis_unseparated.txt.yaml │ │ ├── utf8_sequence_0-0x10ffff_including-unassigned_including-unprintable-replaced_unseparated.txt │ │ ├── utf8_sequence_0-0x10ffff_including-unassigned_including-unprintable-replaced_unseparated.txt.json │ │ ├── utf8_sequence_0-0x10ffff_including-unassigned_including-unprintable-replaced_unseparated.txt.yaml │ │ ├── utf8_sequence_0-0x1ffff_assigned_including-unprintable-asis_unseparated.txt │ │ ├── utf8_sequence_0-0x1ffff_assigned_including-unprintable-asis_unseparated.txt.json │ │ ├── utf8_sequence_0-0x1ffff_assigned_including-unprintable-asis_unseparated.txt.yaml │ │ ├── utf8_sequence_0-0x1ffff_assigned_including-unprintable-replaced_unseparated.txt │ │ ├── utf8_sequence_0-0x1ffff_assigned_including-unprintable-replaced_unseparated.txt.json │ │ ├── utf8_sequence_0-0x1ffff_assigned_including-unprintable-replaced_unseparated.txt.yaml │ │ ├── utf8_sequence_0-0x1ffff_assigned_printable_unseparated.txt │ │ ├── utf8_sequence_0-0x1ffff_assigned_printable_unseparated.txt.json │ │ ├── utf8_sequence_0-0x1ffff_assigned_printable_unseparated.txt.yaml │ │ ├── utf8_sequence_0-0x1ffff_including-unassigned_including-unprintable-asis_unseparated.txt │ │ ├── utf8_sequence_0-0x1ffff_including-unassigned_including-unprintable-asis_unseparated.txt.json │ │ ├── utf8_sequence_0-0x1ffff_including-unassigned_including-unprintable-asis_unseparated.txt.yaml │ │ ├── utf8_sequence_0-0x1ffff_including-unassigned_including-unprintable-replaced_unseparated.txt │ │ ├── utf8_sequence_0-0x1ffff_including-unassigned_including-unprintable-replaced_unseparated.txt.json │ │ ├── utf8_sequence_0-0x1ffff_including-unassigned_including-unprintable-replaced_unseparated.txt.yaml │ │ ├── utf8_sequence_0-0x2ffff_assigned_including-unprintable-asis_unseparated.txt │ │ ├── utf8_sequence_0-0x2ffff_assigned_including-unprintable-asis_unseparated.txt.json │ │ ├── utf8_sequence_0-0x2ffff_assigned_including-unprintable-asis_unseparated.txt.yaml │ │ ├── utf8_sequence_0-0x2ffff_assigned_including-unprintable-replaced_unseparated.txt │ │ ├── utf8_sequence_0-0x2ffff_assigned_including-unprintable-replaced_unseparated.txt.json │ │ ├── utf8_sequence_0-0x2ffff_assigned_including-unprintable-replaced_unseparated.txt.yaml │ │ ├── utf8_sequence_0-0x2ffff_assigned_printable_unseparated.txt │ │ ├── utf8_sequence_0-0x2ffff_assigned_printable_unseparated.txt.json │ │ ├── utf8_sequence_0-0x2ffff_assigned_printable_unseparated.txt.yaml │ │ ├── utf8_sequence_0-0x2ffff_including-unassigned_including-unprintable-asis_unseparated.txt │ │ ├── utf8_sequence_0-0x2ffff_including-unassigned_including-unprintable-asis_unseparated.txt.json │ │ ├── utf8_sequence_0-0x2ffff_including-unassigned_including-unprintable-asis_unseparated.txt.yaml │ │ ├── utf8_sequence_0-0x2ffff_including-unassigned_including-unprintable-replaced_unseparated.txt │ │ ├── utf8_sequence_0-0x2ffff_including-unassigned_including-unprintable-replaced_unseparated.txt.json │ │ ├── utf8_sequence_0-0x2ffff_including-unassigned_including-unprintable-replaced_unseparated.txt.yaml │ │ ├── utf8_sequence_0-0xff_assigned_including-unprintable-asis_unseparated.txt │ │ ├── utf8_sequence_0-0xff_assigned_including-unprintable-asis_unseparated.txt.json │ │ ├── utf8_sequence_0-0xff_assigned_including-unprintable-asis_unseparated.txt.yaml │ │ ├── utf8_sequence_0-0xff_assigned_including-unprintable-replaced_unseparated.txt │ │ ├── utf8_sequence_0-0xff_assigned_including-unprintable-replaced_unseparated.txt.json │ │ ├── utf8_sequence_0-0xff_assigned_including-unprintable-replaced_unseparated.txt.yaml │ │ ├── utf8_sequence_0-0xff_assigned_printable_unseparated.txt │ │ ├── utf8_sequence_0-0xff_assigned_printable_unseparated.txt.json │ │ ├── utf8_sequence_0-0xff_assigned_printable_unseparated.txt.yaml │ │ ├── utf8_sequence_0-0xff_including-unassigned_including-unprintable-asis_unseparated.txt │ │ ├── utf8_sequence_0-0xff_including-unassigned_including-unprintable-asis_unseparated.txt.json │ │ ├── utf8_sequence_0-0xff_including-unassigned_including-unprintable-asis_unseparated.txt.yaml │ │ ├── utf8_sequence_0-0xff_including-unassigned_including-unprintable-replaced_unseparated.txt │ │ ├── utf8_sequence_0-0xff_including-unassigned_including-unprintable-replaced_unseparated.txt.json │ │ ├── utf8_sequence_0-0xff_including-unassigned_including-unprintable-replaced_unseparated.txt.yaml │ │ ├── utf8_sequence_0-0xfff_assigned_including-unprintable-asis_unseparated.txt │ │ ├── utf8_sequence_0-0xfff_assigned_including-unprintable-asis_unseparated.txt.json │ │ ├── utf8_sequence_0-0xfff_assigned_including-unprintable-asis_unseparated.txt.yaml │ │ ├── utf8_sequence_0-0xfff_assigned_including-unprintable-replaced_unseparated.txt │ │ ├── utf8_sequence_0-0xfff_assigned_including-unprintable-replaced_unseparated.txt.json │ │ ├── utf8_sequence_0-0xfff_assigned_including-unprintable-replaced_unseparated.txt.yaml │ │ ├── utf8_sequence_0-0xfff_assigned_printable_unseparated.txt │ │ ├── utf8_sequence_0-0xfff_assigned_printable_unseparated.txt.json │ │ ├── utf8_sequence_0-0xfff_assigned_printable_unseparated.txt.yaml │ │ ├── utf8_sequence_0-0xfff_including-unassigned_including-unprintable-asis_unseparated.txt │ │ ├── utf8_sequence_0-0xfff_including-unassigned_including-unprintable-asis_unseparated.txt.json │ │ ├── utf8_sequence_0-0xfff_including-unassigned_including-unprintable-asis_unseparated.txt.yaml │ │ ├── utf8_sequence_0-0xfff_including-unassigned_including-unprintable-replaced_unseparated.txt │ │ ├── utf8_sequence_0-0xfff_including-unassigned_including-unprintable-replaced_unseparated.txt.json │ │ ├── utf8_sequence_0-0xfff_including-unassigned_including-unprintable-replaced_unseparated.txt.yaml │ │ ├── utf8_sequence_0-0xffff_assigned_including-unprintable-asis_unseparated.txt │ │ ├── utf8_sequence_0-0xffff_assigned_including-unprintable-asis_unseparated.txt.json │ │ ├── utf8_sequence_0-0xffff_assigned_including-unprintable-asis_unseparated.txt.yaml │ │ ├── utf8_sequence_0-0xffff_assigned_including-unprintable-replaced_unseparated.txt │ │ ├── utf8_sequence_0-0xffff_assigned_including-unprintable-replaced_unseparated.txt.json │ │ ├── utf8_sequence_0-0xffff_assigned_including-unprintable-replaced_unseparated.txt.yaml │ │ ├── utf8_sequence_0-0xffff_assigned_printable_unseparated.txt │ │ ├── utf8_sequence_0-0xffff_assigned_printable_unseparated.txt.json │ │ ├── utf8_sequence_0-0xffff_assigned_printable_unseparated.txt.yaml │ │ ├── utf8_sequence_0-0xffff_including-unassigned_including-unprintable-asis_unseparated.txt │ │ ├── utf8_sequence_0-0xffff_including-unassigned_including-unprintable-asis_unseparated.txt.json │ │ ├── utf8_sequence_0-0xffff_including-unassigned_including-unprintable-asis_unseparated.txt.yaml │ │ ├── utf8_sequence_0-0xffff_including-unassigned_including-unprintable-replaced_unseparated.txt │ │ ├── utf8_sequence_0-0xffff_including-unassigned_including-unprintable-replaced_unseparated.txt.json │ │ └── utf8_sequence_0-0xffff_including-unassigned_including-unprintable-replaced_unseparated.txt.yaml │ ├── refract │ ├── dsd │ │ ├── test-Array.cc │ │ ├── test-Bool.cc │ │ ├── test-Element.cc │ │ ├── test-Enum.cc │ │ ├── test-Extend.cc │ │ ├── test-Holder.cc │ │ ├── test-InfoElements.cc │ │ ├── test-Member.cc │ │ ├── test-Null.cc │ │ ├── test-Number.cc │ │ ├── test-Object.cc │ │ ├── test-Option.cc │ │ ├── test-Ref.cc │ │ ├── test-Select.cc │ │ └── test-String.cc │ ├── test-Cardinal.cc │ ├── test-ElementSize.cc │ ├── test-InfoElementsUtils.cc │ ├── test-JsonSchema.cc │ ├── test-JsonValue.cc │ └── test-Utils.cc │ ├── test-ApplyVisitorTest.cc │ ├── test-CAPI.c │ ├── test-CircularReferenceTest.cc │ ├── test-ElementComparator.cc │ ├── test-ElementDataTest.cc │ ├── test-ElementFactoryTest.cc │ ├── test-ElementInfoUtils.cc │ ├── test-ExtendElementTest.cc │ ├── test-OneOfTest.cc │ ├── test-RefractAPITest.cc │ ├── test-RefractDataStructureTest.cc │ ├── test-RefractParseResultTest.cc │ ├── test-RefractSourceMapTest.cc │ ├── test-RenderTest.cc │ ├── test-SchemaTest.cc │ ├── test-Serialize.cc │ ├── test-SyntaxIssuesTest.cc │ ├── test-VisitorUtils.cc │ ├── test-drafter.cc │ ├── test-sourceMapToLineColumn.cc │ └── utils │ ├── so │ ├── test-JsonIo.cc │ └── test-YamlIo.cc │ └── test-Utf8.cc ├── tools ├── clang-format-check.sh ├── clang-format-fix.sh ├── coverage.sh ├── gyp │ ├── .gitignore │ ├── AUTHORS │ ├── DEPS │ ├── LICENSE │ ├── OWNERS │ ├── PRESUBMIT.py │ ├── README.md │ ├── buildbot │ │ ├── buildbot_run.py │ │ └── commit_queue │ │ │ ├── OWNERS │ │ │ ├── README │ │ │ └── cq_config.json │ ├── codereview.settings │ ├── data │ │ └── win │ │ │ └── large-pdb-shim.cc │ ├── gyp │ ├── gyp.bat │ ├── gyp_main.py │ ├── gyptest.py │ ├── pylib │ │ └── gyp │ │ │ ├── MSVSNew.py │ │ │ ├── MSVSProject.py │ │ │ ├── MSVSSettings.py │ │ │ ├── MSVSSettings_test.py │ │ │ ├── MSVSToolFile.py │ │ │ ├── MSVSUserFile.py │ │ │ ├── MSVSUtil.py │ │ │ ├── MSVSVersion.py │ │ │ ├── __init__.py │ │ │ ├── common.py │ │ │ ├── common_test.py │ │ │ ├── easy_xml.py │ │ │ ├── easy_xml_test.py │ │ │ ├── flock_tool.py │ │ │ ├── generator │ │ │ ├── __init__.py │ │ │ ├── analyzer.py │ │ │ ├── android.py │ │ │ ├── cmake.py │ │ │ ├── dump_dependency_json.py │ │ │ ├── eclipse.py │ │ │ ├── gypd.py │ │ │ ├── gypsh.py │ │ │ ├── make.py │ │ │ ├── msvs.py │ │ │ ├── msvs_test.py │ │ │ ├── ninja.py │ │ │ ├── ninja_test.py │ │ │ ├── xcode.py │ │ │ └── xcode_test.py │ │ │ ├── input.py │ │ │ ├── input_test.py │ │ │ ├── mac_tool.py │ │ │ ├── msvs_emulation.py │ │ │ ├── ninja_syntax.py │ │ │ ├── ordered_dict.py │ │ │ ├── simple_copy.py │ │ │ ├── win_tool.py │ │ │ ├── xcode_emulation.py │ │ │ ├── xcode_ninja.py │ │ │ ├── xcodeproj_file.py │ │ │ └── xml_fix.py │ ├── pylintrc │ ├── samples │ │ ├── samples │ │ └── samples.bat │ ├── setup.py │ └── tools │ │ ├── README │ │ ├── Xcode │ │ ├── README │ │ └── Specifications │ │ │ ├── gyp.pbfilespec │ │ │ └── gyp.xclangspec │ │ ├── emacs │ │ ├── README │ │ ├── gyp-tests.el │ │ ├── gyp.el │ │ ├── run-unit-tests.sh │ │ └── testdata │ │ │ ├── media.gyp │ │ │ └── media.gyp.fontified │ │ ├── graphviz.py │ │ ├── pretty_gyp.py │ │ ├── pretty_sln.py │ │ └── pretty_vcproj.py ├── make-tarball.sh ├── make-third-party-licenses.sh ├── refract-filter.py ├── release.sh └── third-party-licenses-check.sh └── vcbuild.bat /.gitattributes: -------------------------------------------------------------------------------- 1 | # Always use LF for .apib files 2 | *.apib text eol=lf 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files 2 | *.slo 3 | *.lo 4 | *.o 5 | *.obj 6 | 7 | # Precompiled Headers 8 | *.gch 9 | *.pch 10 | 11 | # Compiled Dynamic libraries 12 | *.so 13 | *.dylib 14 | *.dll 15 | 16 | # Fortran module files 17 | *.mod 18 | 19 | # Compiled Static libraries 20 | *.lai 21 | *.la 22 | *.a 23 | *.lib 24 | 25 | # Executables 26 | *.exe 27 | *.out 28 | *.app 29 | 30 | # Generated files 31 | config.mk 32 | config.gypi 33 | bin/ 34 | build/ 35 | vendor/ 36 | .vagrant/ 37 | tmp/ 38 | 39 | # OS X and Xcode specific 40 | .DS_Store 41 | build/ 42 | *.pbxuser 43 | !default.pbxuser 44 | *.mode1v3 45 | !default.mode1v3 46 | *.mode2v3 47 | !default.mode2v3 48 | *.perspectivev3 49 | !default.perspectivev3 50 | xcuserdata 51 | xcshareddata 52 | profile 53 | *.moved-aside 54 | DerivedData 55 | .idea/ 56 | 57 | node_modules 58 | emcc/drafter.js 59 | emcc/drafter.js.mem 60 | emcc/drafter.nomem.js 61 | drafter.js-*.tgz 62 | tags 63 | *.swo 64 | *.swp 65 | .cproject 66 | .project 67 | .settings 68 | 69 | # log 70 | *.log 71 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "ext/snowcrash/ext/markdown-parser/ext/sundown"] 2 | path = packages/sundown 3 | url = https://github.com/apiaryio/sundown.git 4 | [submodule "test/vendor/Catch"] 5 | path = packages/Catch 6 | url = https://github.com/catchorg/Catch2.git 7 | [submodule "ext/cmdline"] 8 | path = packages/cmdline 9 | url = https://github.com/apiaryio/cmdline.git 10 | [submodule "test/vendor/dtl"] 11 | path = packages/dtl 12 | url = https://github.com/apiaryio/dtl 13 | [submodule "ext/variant"] 14 | path = packages/variant 15 | url = https://github.com/mpark/variant.git 16 | [submodule "ext/PEGTL"] 17 | path = packages/PEGTL 18 | url = https://github.com/taocpp/PEGTL.git 19 | -------------------------------------------------------------------------------- /CTestConfig.cmake: -------------------------------------------------------------------------------- 1 | ## This file should be placed in the root directory of your project. 2 | ## Then modify the CMakeLists.txt file in the root directory of your 3 | ## project to incorporate the testing dashboard. 4 | ## 5 | 6 | set(CTEST_PROJECT_NAME "Drafter") 7 | set(CTEST_NIGHTLY_START_TIME "01:00:00 UTC") 8 | 9 | set(CTEST_DROP_METHOD "http") 10 | set(CTEST_DROP_SITE "my.cdash.org") 11 | set(CTEST_DROP_LOCATION "/submit.php?project=Drafter") 12 | set(CTEST_DROP_SITE_CDASH TRUE) 13 | -------------------------------------------------------------------------------- /DefaultBuildType.cmake: -------------------------------------------------------------------------------- 1 | set(default_build_type "Release") 2 | 3 | if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) 4 | message(STATUS "Setting build type to '${default_build_type}' as none was specified.") 5 | set(CMAKE_BUILD_TYPE "${default_build_type}" CACHE 6 | STRING "Choose the type of build." FORCE) 7 | # Set the possible values of build type for cmake-gui 8 | set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS 9 | "Debug" "Release" "MinSizeRel" "RelWithDebInfo") 10 | endif() 11 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.10 as build 2 | MAINTAINER Apiary "sre@apiary.io" 3 | 4 | WORKDIR /usr/src/drafter 5 | 6 | ADD CMakeLists.txt DefaultBuildType.cmake ./ 7 | ADD packages packages 8 | 9 | WORKDIR /tmp/drafter 10 | 11 | RUN apk add --no-cache cmake make g++ 12 | RUN cmake /usr/src/drafter 13 | 14 | RUN make drafter 15 | RUN make install 16 | 17 | FROM alpine:3.10 18 | 19 | RUN apk add --no-cache gcc 20 | COPY --from=build /usr/local/bin/drafter /usr/local/bin/drafter 21 | ADD LICENSE /usr/local/share/licenses/drafter/LICENSE 22 | 23 | CMD drafter 24 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | # 2 | # Gems needed for integration testing Drafter CLI with cucumber 3 | # 4 | 5 | source 'https://rubygems.org' 6 | 7 | gem 'cucumber' 8 | gem 'aruba' 9 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Apiary 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /appveyor.yml: -------------------------------------------------------------------------------- 1 | version: '{build}' 2 | clone_folder: c:\projects\drafter 3 | image: 4 | - Visual Studio 2015 5 | configuration: 6 | - Release 7 | platform: 8 | - x64 9 | install: 10 | - set PATH=C:\Ruby25\bin;%PATH% 11 | before_build: 12 | - cmd: |- 13 | git submodule update --init --recursive 14 | curl -O https://curl.haxx.se/ca/cacert.pem 15 | SET SSL_CERT_FILE=%cd%\cacert.pem 16 | rm Gemfile.lock 17 | bundle install --path bundle 18 | build_script: 19 | - cmd: ctest --extra-verbose -j4 -S cmake/win_release.cmake -DCTEST_CMAKE_GENERATOR="Visual Studio 14 2015 Win64" -DCTEST_BUILD_NAME="Windows" 20 | -------------------------------------------------------------------------------- /features/fixtures/invalid_blueprint.apib: -------------------------------------------------------------------------------- 1 | # GET / 2 | + Response 200 3 | 4 | # Unexpected Markdown header 5 | -------------------------------------------------------------------------------- /features/parse.feature: -------------------------------------------------------------------------------- 1 | Feature: Parse a blueprint 2 | 3 | Scenario: Parse a blueprint file into Refract YAML 4 | 5 | When I run `drafter blueprint.apib` 6 | Then the output should contain the content of file "refract.yaml" 7 | 8 | Scenario: Parse a blueprint input into Refract YAML 9 | 10 | When I run `drafter` interactively 11 | When I pipe in the file "blueprint.apib" 12 | Then the output should contain the content of file "refract.yaml" 13 | 14 | Scenario: Parse a blueprint file into Refract JSON 15 | 16 | When I run `drafter -f json blueprint.apib` 17 | Then the output should contain the content of file "refract.json" 18 | 19 | Scenario: Parse a blueprint input into Refract JSON 20 | 21 | When I run `drafter -f json` interactively 22 | When I pipe in the file "blueprint.apib" 23 | Then the output should contain the content of file "refract.json" 24 | -------------------------------------------------------------------------------- /features/sourcemap.feature: -------------------------------------------------------------------------------- 1 | Feature: Validate SourceMap output 2 | 3 | Scenario: Parse a blueprint file into refract YAML with sourcemap 4 | When I run `drafter -s blueprint.apib` 5 | Then the output should contain the content of file "refract.sourcemap.yaml" 6 | 7 | Scenario: Parse a blueprint file into refract JSON with sourcemap 8 | When I run `drafter -s -f json blueprint.apib` 9 | Then the output should contain the content of file "refract.sourcemap.json" 10 | -------------------------------------------------------------------------------- /features/step_definitions/file_content_step.rb: -------------------------------------------------------------------------------- 1 | Then /^the output should contain the content of file "(.*)"$/ do |filename| 2 | expected = nil 3 | 4 | path = File.join(aruba.config.fixtures_directories[0], filename) 5 | expected = File.read(path) 6 | 7 | if ENV['GENERATE'] == '1' 8 | File.write(path, all_output) 9 | end 10 | 11 | assert_partial_output(expected, all_output) 12 | end 13 | -------------------------------------------------------------------------------- /features/support/aruba_config.rb: -------------------------------------------------------------------------------- 1 | Aruba.configure do |config| 2 | bin = File.join(Dir.pwd, 'bin') 3 | ENV['PATH'] = "#{bin}#{File::PATH_SEPARATOR}#{ENV['PATH']}" 4 | end 5 | -------------------------------------------------------------------------------- /features/support/env.rb: -------------------------------------------------------------------------------- 1 | require 'aruba/cucumber' 2 | 3 | Before do 4 | copy File.join(aruba.config.fixtures_path_prefix, 'blueprint.apib'), 'blueprint.apib' 5 | copy File.join(aruba.config.fixtures_path_prefix, 'invalid_blueprint.apib'), 'invalid_blueprint.apib' 6 | end 7 | -------------------------------------------------------------------------------- /features/support/setup.rb: -------------------------------------------------------------------------------- 1 | require 'aruba/cucumber' 2 | -------------------------------------------------------------------------------- /features/version.feature: -------------------------------------------------------------------------------- 1 | Feature: Version of Snow Crash 2 | 3 | Scenario: Print the semantic version of Snow Crash 4 | 5 | # Note the output should be a semantic version (semver.org) 6 | # The matching regex was taken from https://github.com/isaacs/node-semver/issues/32#issue-15023919 7 | 8 | When I run `drafter --version` 9 | Then the output should match /^v([0-9]+)\.([0-9]+)\.([0-9]+)(?:-([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?(?:\+[0-9A-Za-z-]+)?$/ 10 | And the exit status should be 0 11 | -------------------------------------------------------------------------------- /packages/apib-parser/apib-parser-config.cmake: -------------------------------------------------------------------------------- 1 | include(CMakeFindDependencyMacro) 2 | find_dependency(apib 1.0) 3 | find_dependency(Sundown 1.0) 4 | find_dependency(pegtl 2.8) 5 | find_dependency(BoostContainer 1.66) 6 | find_dependency(MPark.Variant 1.3) 7 | include("${CMAKE_CURRENT_LIST_DIR}/apib-parser-targets.cmake") 8 | -------------------------------------------------------------------------------- /packages/apib-parser/include/apib/parser/MediaTypeParser.h: -------------------------------------------------------------------------------- 1 | // 2 | // MediaTypeParser.h 3 | // apib-parser 4 | // 5 | // Created by Thomas Jandecka on 07/04/2020 6 | // Copyright (c) 2020 Apiary Inc. All rights reserved. 7 | // 8 | 9 | #ifndef APIB_PARSER_MEDIA_TYPE_PARSER_H 10 | #define APIB_PARSER_MEDIA_TYPE_PARSER_H 11 | 12 | #include 13 | 14 | namespace apib 15 | { 16 | namespace parser 17 | { 18 | apib::syntax::media_type parseMediaType(const std::string& input); 19 | } 20 | 21 | } 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /packages/apib-parser/src/MediaTypeParser.cc: -------------------------------------------------------------------------------- 1 | // 2 | // MediaTypeParser.cc 3 | // drafter 4 | // 5 | // Created by Jiri Kratochvil on 27/08/2019 6 | // Copyright (c) 2019 Apiary Inc. All rights reserved. 7 | // 8 | 9 | #include 10 | #include 11 | 12 | #include "grammar/Mediatype.h" 13 | 14 | using namespace apib::syntax; 15 | using namespace apib::parser::mediatype; 16 | 17 | media_type apib::parser::parseMediaType(const std::string& input) 18 | { 19 | media_type result; 20 | tao::pegtl::memory_input<> in(input, ""); 21 | tao::pegtl::parse, action>(in, result); 22 | return result; 23 | } 24 | -------------------------------------------------------------------------------- /packages/apib-parser/src/markdown-parser/README.md: -------------------------------------------------------------------------------- 1 | # Markdown Parser [![Build Status](https://travis-ci.org/apiaryio/markdown-parser.svg?branch=master)](https://travis-ci.org/apiaryio/markdown-parser) 2 | 3 | `Markdown Parser` purpose is to process a Markdown file and produce its abstract syntax tree (AST for short) which is suitable for further machine-processing. The AST also includes source maps for its nodes. 4 | 5 | Markdown Parser is currently built on top of the (now deprecated) [`sundown`](https://github.com/apiaryio/sundown) library. In the future the `sundown` may be replaced with [`hoedown`](https://github.com/hoedown/hoedown/) libray or even [`Redcarpet`](https://github.com/vmg/redcarpet) "C" core. 6 | 7 | ## Contribute 8 | Fork & Pull Request 9 | 10 | ## License 11 | MIT License. See the [LICENSE](LICENSE) file. 12 | -------------------------------------------------------------------------------- /packages/apib-parser/src/snowcrash/Just.h: -------------------------------------------------------------------------------- 1 | // 2 | // Just.h 3 | // snowcrash 4 | // 5 | // Created by Thomas Jandecka on 11/7/19. 6 | // Copyright (c) 2019 Apiary Inc. All rights reserved. 7 | // 8 | 9 | #ifndef SNOWCRASH_JUST_H 10 | #define SNOWCRASH_JUST_H 11 | 12 | #include 13 | 14 | namespace mson 15 | { 16 | template 17 | struct just { 18 | 19 | T content; 20 | 21 | just() noexcept(T()) : content{} {} 22 | 23 | explicit just(T&& c) noexcept : content{ std::move(c) } {} 24 | explicit just(const T& c) : content{ c } {} 25 | 26 | const T* operator->() const noexcept 27 | { 28 | return &content; 29 | } 30 | 31 | T* operator->() noexcept 32 | { 33 | return &content; 34 | } 35 | 36 | const T& operator*() const noexcept 37 | { 38 | return content; 39 | } 40 | 41 | T& operator*() noexcept 42 | { 43 | return content; 44 | } 45 | }; 46 | } 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /packages/apib-parser/src/snowcrash/Platform.h: -------------------------------------------------------------------------------- 1 | // 2 | // Platform.h 3 | // snowcrash 4 | // 5 | // Created by Zdenek Nemec on 7/2/13. 6 | // Copyright (c) 2013 Apiary Inc. All rights reserved. 7 | // 8 | 9 | #ifndef SNOWCRASH_PLATFORM_H 10 | #define SNOWCRASH_PLATFORM_H 11 | 12 | #define AS_TYPE(Type, Obj) reinterpret_cast(Obj) 13 | #define AS_CTYPE(Type, Obj) reinterpret_cast(Obj) 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /packages/apib-parser/src/snowcrash/README.md: -------------------------------------------------------------------------------- 1 | ![logo](https://raw.github.com/apiaryio/api-blueprint/master/assets/logo_apiblueprint.png) 2 | 3 | # Snowcrash 4 | 5 | ## C++ library 6 | 7 | ```c++ 8 | #include "snowcrash.h" 9 | 10 | mdp::ByteBuffer blueprint = R"( 11 | # My API 12 | ## GET /message 13 | + Response 200 (text/plain) 14 | 15 | Hello World! 16 | )"; 17 | 18 | snowcrash::ParseResult ast; 19 | snowcrash::parse(blueprint, 0, ast); 20 | 21 | std::cout << "API Name: " << ast.node.name << std::endl; 22 | ``` 23 | 24 | Refer to [`Blueprint.h`](src/Blueprint.h) for the details about the Snow Crash AST and [`BlueprintSourcemap.h`](src/BlueprintSourcemap.h) for details about Source Maps tree. 25 | -------------------------------------------------------------------------------- /packages/apib-parser/src/snowcrash/RegexMatch.h: -------------------------------------------------------------------------------- 1 | // 2 | // RegexMatch.h 3 | // snowcrash 4 | // 5 | // Created by Zdenek Nemec on 5/2/13. 6 | // Copyright (c) 2013 Apiary Inc. All rights reserved. 7 | // 8 | 9 | #ifndef SNOWCRASH_REGEXMATCH_H 10 | #define SNOWCRASH_REGEXMATCH_H 11 | 12 | #include 13 | #include 14 | 15 | namespace snowcrash 16 | { 17 | 18 | // Perform snowcrash-specific regex evaluation 19 | // returns true if target string matches given expression, false otherwise 20 | bool RegexMatch(const std::string& target, const std::string& expression); 21 | 22 | // Performs posix-regex and returns first captured group (excluding whole target) 23 | std::string RegexCaptureFirst(const std::string& target, const std::string& expression); 24 | 25 | // Array of capture groups 26 | typedef std::vector CaptureGroups; 27 | 28 | // Performs posix-regex 29 | // returns true if target string matches given expression, false otherwise 30 | bool RegexCapture( 31 | const std::string& target, const std::string& expression, CaptureGroups& captureGroups, size_t groupSize = 8); 32 | } 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /packages/apib-parser/test/snowcrash/README.md: -------------------------------------------------------------------------------- 1 | # Snow Crash Test Suite 2 | 3 | https://github.com/philsquared/Catch/wiki 4 | 5 | --- 6 | 7 | TODO: -------------------------------------------------------------------------------- /packages/apib-parser/test/snowcrash/test-Blueprint.cc: -------------------------------------------------------------------------------- 1 | // 2 | // test-Blueprint.cc 3 | // snowcrash 4 | // 5 | // Created by Zdenek Nemec on 4/3/13. 6 | // Copyright (c) 2013 Apiary Inc. All rights reserved. 7 | // 8 | 9 | #include 10 | #include "Blueprint.h" 11 | 12 | using namespace snowcrash; 13 | 14 | TEST_CASE("blueprint/blueprint-init", "Blueprint initialization") 15 | { 16 | Blueprint blueprint; 17 | REQUIRE(blueprint.name.length() == 0); 18 | REQUIRE(blueprint.description.length() == 0); 19 | REQUIRE(blueprint.metadata.size() == 0); 20 | REQUIRE(blueprint.content.elements().size() == 0); 21 | } 22 | 23 | TEST_CASE("blueprint/init", "Blueprint initialization") 24 | { 25 | Blueprint blueprint; 26 | REQUIRE(blueprint.name.length() == 0); 27 | REQUIRE(blueprint.description.length() == 0); 28 | REQUIRE(blueprint.metadata.size() == 0); 29 | REQUIRE(blueprint.content.elements().size() == 0); 30 | } 31 | -------------------------------------------------------------------------------- /packages/apib-parser/test/snowcrash/test-ModelTable.cc: -------------------------------------------------------------------------------- 1 | // 2 | // test-ModelTable.cc 3 | // snowcrash 4 | // 5 | // Created by Zdenek Nemec on 6/9/13. 6 | // Copyright (c) 2013 Apiary Inc. All rights reserved. 7 | // 8 | 9 | #include "snowcrash.h" 10 | #include "snowcrashtest.h" 11 | #include "ResourceParser.h" 12 | 13 | using namespace snowcrash; 14 | using namespace snowcrashtest; 15 | 16 | TEST_CASE("Parse object resource model", "[model_table]") 17 | { 18 | mdp::ByteBuffer source 19 | = "# /resource\n" 20 | "+ Super Model (text/plain)\n\n" 21 | " {...}\n"; 22 | 23 | // Check we will get error parsing the same symbol again with the same symbol table 24 | Models models; 25 | ModelHelper::build("Super", models); 26 | 27 | ParseResult resource; 28 | SectionParserHelper::parse(source, ModelBodySectionType, resource, 0, models); 29 | 30 | REQUIRE(resource.report.error.code != Error::OK); 31 | } 32 | -------------------------------------------------------------------------------- /packages/apib-parser/test/test-apib_parser.cc: -------------------------------------------------------------------------------- 1 | #define CATCH_CONFIG_MAIN 2 | 3 | #include 4 | -------------------------------------------------------------------------------- /packages/apib/apib-config.cmake: -------------------------------------------------------------------------------- 1 | include(CMakeFindDependencyMacro) 2 | find_dependency(BoostContainer 1.66) 3 | find_dependency(MPark.Variant 1.3) 4 | include("${CMAKE_CURRENT_LIST_DIR}/apib-targets.cmake") 5 | 6 | -------------------------------------------------------------------------------- /packages/apib/include/apib/syntax/MediaType.h: -------------------------------------------------------------------------------- 1 | // 2 | // MediaType.h 3 | // apib 4 | // 5 | // Created by Thomas Jandecka on 07/04/2020 6 | // Copyright (c) 2020 Apiary Inc. All rights reserved. 7 | // 8 | 9 | #ifndef APIB_SYNTAX_MEDIA_TYPE_H 10 | #define APIB_SYNTAX_MEDIA_TYPE_H 11 | 12 | #include 13 | #include 14 | #include 15 | 16 | namespace apib 17 | { 18 | namespace syntax 19 | { 20 | struct media_type { 21 | using parameter = std::pair; 22 | 23 | std::string type; 24 | std::string subtype; 25 | std::string suffix; 26 | std::vector parameters; 27 | }; 28 | 29 | } 30 | 31 | bool isJSON(const syntax::media_type&) noexcept; 32 | bool isJSONSchema(const syntax::media_type&) noexcept; 33 | 34 | } 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /packages/apib/test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.5 FATAL_ERROR) 2 | 3 | find_package(Catch2 1.0 REQUIRED) 4 | 5 | add_executable(apib-test 6 | test-MediaType.cc 7 | test-apib.cc 8 | ) 9 | 10 | target_link_libraries(apib-test 11 | PUBLIC 12 | Catch2::Catch2 13 | Apiary::apib 14 | ) 15 | 16 | target_include_directories(apib-test PRIVATE ../src) 17 | 18 | add_test(ApibTest apib-test) 19 | -------------------------------------------------------------------------------- /packages/apib/test/test-apib.cc: -------------------------------------------------------------------------------- 1 | #define CATCH_CONFIG_MAIN 2 | 3 | #include 4 | -------------------------------------------------------------------------------- /packages/boost/BoostContainerConfig.cmake: -------------------------------------------------------------------------------- 1 | include(CMakeFindDependencyMacro) 2 | include("${CMAKE_CURRENT_LIST_DIR}/BoostContainerTargets.cmake") 3 | -------------------------------------------------------------------------------- /packages/boost/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.5 FATAL_ERROR) 2 | 3 | project(BoostContainer VERSION 1.66 LANGUAGES CXX) 4 | 5 | add_library(container INTERFACE) 6 | 7 | target_include_directories(container INTERFACE 8 | $ 9 | $ 10 | $ 11 | ) 12 | 13 | target_link_libraries(container INTERFACE) 14 | 15 | install(EXPORT container-targets 16 | FILE BoostContainerTargets.cmake 17 | NAMESPACE Boost:: 18 | DESTINATION lib/cmake/boost 19 | ) 20 | 21 | install(TARGETS container EXPORT container-targets 22 | INCLUDES DESTINATION include 23 | ) 24 | 25 | include(CMakePackageConfigHelpers) 26 | write_basic_package_version_file("BoostContainerConfigVersion.cmake" 27 | VERSION ${BoostContainer_VERSION} 28 | COMPATIBILITY SameMajorVersion 29 | ) 30 | install( 31 | FILES 32 | "BoostContainerConfig.cmake" 33 | "${CMAKE_CURRENT_BINARY_DIR}/BoostContainerConfigVersion.cmake" 34 | DESTINATION 35 | lib/cmake/boost 36 | ) 37 | 38 | add_library(Boost::container ALIAS container) 39 | -------------------------------------------------------------------------------- /packages/boost/VERSION.txt: -------------------------------------------------------------------------------- 1 | 1.82.0 2 | -------------------------------------------------------------------------------- /packages/boost/boost/config/abi/borland_prefix.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright John Maddock 2003. 2 | // Use, modification and distribution are subject to the 3 | // Boost Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | // for C++ Builder the following options effect the ABI: 7 | // 8 | // -b (on or off - effect emum sizes) 9 | // -Vx (on or off - empty members) 10 | // -Ve (on or off - empty base classes) 11 | // -aX (alignment - 5 options). 12 | // -pX (Calling convention - 4 options) 13 | // -VmX (member pointer size and layout - 5 options) 14 | // -VC (on or off, changes name mangling) 15 | // -Vl (on or off, changes struct layout). 16 | 17 | // In addition the following warnings are sufficiently annoying (and 18 | // unfixable) to have them turned off by default: 19 | // 20 | // 8027 - functions containing [for|while] loops are not expanded inline 21 | // 8026 - functions taking class by value arguments are not expanded inline 22 | 23 | #pragma nopushoptwarn 24 | # pragma option push -a8 -Vx- -Ve- -b- -pc -Vmv -VC- -Vl- -w-8027 -w-8026 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /packages/boost/boost/config/abi/borland_suffix.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright John Maddock 2003. 2 | // Use, modification and distribution are subject to the 3 | // Boost Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | # pragma option pop 7 | #pragma nopushoptwarn 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /packages/boost/boost/config/abi/msvc_prefix.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright John Maddock 2003. 2 | // Use, modification and distribution are subject to the 3 | // Boost Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | // 7 | // Boost binaries are built with the compiler's default ABI settings, 8 | // if the user changes their default alignment in the VS IDE then their 9 | // code will no longer be binary compatible with the bjam built binaries 10 | // unless this header is included to force Boost code into a consistent ABI. 11 | // 12 | // Note that inclusion of this header is only necessary for libraries with 13 | // separate source, header only libraries DO NOT need this as long as all 14 | // translation units are built with the same options. 15 | // 16 | #if defined(_M_X64) 17 | # pragma pack(push,16) 18 | #else 19 | # pragma pack(push,8) 20 | #endif 21 | 22 | 23 | -------------------------------------------------------------------------------- /packages/boost/boost/config/abi/msvc_suffix.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright John Maddock 2003. 2 | // Use, modification and distribution are subject to the 3 | // Boost Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #pragma pack(pop) 7 | 8 | 9 | -------------------------------------------------------------------------------- /packages/boost/boost/config/abi_prefix.hpp: -------------------------------------------------------------------------------- 1 | // abi_prefix header -------------------------------------------------------// 2 | 3 | // (c) Copyright John Maddock 2003 4 | 5 | // Use, modification and distribution are subject to the Boost Software License, 6 | // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 7 | // http://www.boost.org/LICENSE_1_0.txt). 8 | 9 | #ifndef BOOST_CONFIG_ABI_PREFIX_HPP 10 | # define BOOST_CONFIG_ABI_PREFIX_HPP 11 | #else 12 | # error double inclusion of header boost/config/abi_prefix.hpp is an error 13 | #endif 14 | 15 | #include 16 | 17 | // this must occur after all other includes and before any code appears: 18 | #ifdef BOOST_HAS_ABI_HEADERS 19 | # include BOOST_ABI_PREFIX 20 | #endif 21 | 22 | #if defined( BOOST_BORLANDC ) 23 | #pragma nopushoptwarn 24 | #endif 25 | 26 | -------------------------------------------------------------------------------- /packages/boost/boost/config/abi_suffix.hpp: -------------------------------------------------------------------------------- 1 | // abi_sufffix header -------------------------------------------------------// 2 | 3 | // (c) Copyright John Maddock 2003 4 | 5 | // Use, modification and distribution are subject to the Boost Software License, 6 | // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 7 | // http://www.boost.org/LICENSE_1_0.txt). 8 | 9 | // This header should be #included AFTER code that was preceded by a #include 10 | // . 11 | 12 | #ifndef BOOST_CONFIG_ABI_PREFIX_HPP 13 | # error Header boost/config/abi_suffix.hpp must only be used after boost/config/abi_prefix.hpp 14 | #else 15 | # undef BOOST_CONFIG_ABI_PREFIX_HPP 16 | #endif 17 | 18 | // the suffix header occurs after all of our code: 19 | #ifdef BOOST_HAS_ABI_HEADERS 20 | # include BOOST_ABI_SUFFIX 21 | #endif 22 | 23 | #if defined( BOOST_BORLANDC ) 24 | #pragma nopushoptwarn 25 | #endif 26 | -------------------------------------------------------------------------------- /packages/boost/boost/config/assert_cxx98.hpp: -------------------------------------------------------------------------------- 1 | // This file was automatically generated on Wed Mar 3 08:46:11 2021 2 | // by libs/config/tools/generate.cpp 3 | // Copyright John Maddock 2002-4. 4 | // Use, modification and distribution are subject to the 5 | // Boost Software License, Version 1.0. (See accompanying file 6 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 7 | 8 | // See http://www.boost.org/libs/config for the most recent version.// 9 | // Revision $Id$ 10 | // 11 | 12 | #include 13 | #include 14 | 15 | #ifdef BOOST_NO_CXX98_BINDERS 16 | # error "Your compiler appears not to be fully C++98 compliant. Detected via defect macro BOOST_NO_CXX98_BINDERS." 17 | #endif 18 | #ifdef BOOST_NO_CXX98_FUNCTION_BASE 19 | # error "Your compiler appears not to be fully C++98 compliant. Detected via defect macro BOOST_NO_CXX98_FUNCTION_BASE." 20 | #endif 21 | #ifdef BOOST_NO_CXX98_RANDOM_SHUFFLE 22 | # error "Your compiler appears not to be fully C++98 compliant. Detected via defect macro BOOST_NO_CXX98_RANDOM_SHUFFLE." 23 | #endif 24 | -------------------------------------------------------------------------------- /packages/boost/boost/config/compiler/compaq_cxx.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright John Maddock 2001 - 2003. 2 | // Use, modification and distribution are subject to the 3 | // Boost Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | // See http://www.boost.org for most recent version. 7 | 8 | // Tru64 C++ compiler setup (now HP): 9 | 10 | #define BOOST_COMPILER "HP Tru64 C++ " BOOST_STRINGIZE(__DECCXX_VER) 11 | 12 | #include 13 | 14 | // 15 | // versions check: 16 | // Nothing to do here? 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /packages/boost/boost/config/compiler/diab.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright Brian Kuhl 2016. 2 | // Use, modification and distribution are subject to the 3 | // Boost Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | // Check this is a recent EDG based compiler, otherwise we don't support it here: 7 | 8 | 9 | #ifndef __EDG_VERSION__ 10 | # error "Unknown Diab compiler version - please run the configure tests and report the results" 11 | #endif 12 | 13 | #include "boost/config/compiler/common_edg.hpp" 14 | 15 | #define BOOST_NO_TWO_PHASE_NAME_LOOKUP 16 | #define BOOST_BUGGY_INTEGRAL_CONSTANT_EXPRESSIONS 17 | 18 | #define BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE 19 | #define BOOST_LOG_NO_MEMBER_TEMPLATE_FRIENDS 20 | #define BOOST_REGEX_NO_EXTERNAL_TEMPLATES 21 | 22 | #define BOOST_NO_CXX11_HDR_INITIALIZER_LIST 23 | #define BOOST_NO_CXX11_HDR_CODECVT 24 | #define BOOST_NO_CXX11_NUMERIC_LIMITS 25 | 26 | #define BOOST_COMPILER "Wind River Diab " BOOST_STRINGIZE(__VERSION_NUMBER__) 27 | -------------------------------------------------------------------------------- /packages/boost/boost/config/compiler/greenhills.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright John Maddock 2001. 2 | // Use, modification and distribution are subject to the 3 | // Boost Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | // See http://www.boost.org for most recent version. 7 | 8 | // Greenhills C++ compiler setup: 9 | 10 | #define BOOST_COMPILER "Greenhills C++ version " BOOST_STRINGIZE(__ghs) 11 | 12 | #include 13 | 14 | // 15 | // versions check: 16 | // we don't support Greenhills prior to version 0: 17 | #if __ghs < 0 18 | # error "Compiler not supported or configured - please reconfigure" 19 | #endif 20 | // 21 | // last known and checked version is 0: 22 | #if (__ghs > 0) 23 | # if defined(BOOST_ASSERT_CONFIG) 24 | # error "boost: Unknown compiler version - please run the configure tests and report the results" 25 | # endif 26 | #endif 27 | 28 | 29 | -------------------------------------------------------------------------------- /packages/boost/boost/config/compiler/pgi.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright Noel Belcourt 2007. 2 | // Copyright 2017, NVIDIA CORPORATION. 3 | // Use, modification and distribution are subject to the 4 | // Boost Software License, Version 1.0. (See accompanying file 5 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | 7 | // See http://www.boost.org for most recent version. 8 | 9 | // PGI C++ compiler setup: 10 | 11 | #define BOOST_COMPILER_VERSION __PGIC__##__PGIC_MINOR__ 12 | #define BOOST_COMPILER "PGI compiler version " BOOST_STRINGIZE(BOOST_COMPILER_VERSION) 13 | 14 | // PGI is mostly GNU compatible. So start with that. 15 | #include 16 | 17 | // Now adjust for things that are different. 18 | 19 | // __float128 is a typedef, not a distinct type. 20 | #undef BOOST_HAS_FLOAT128 21 | 22 | // __int128 is not supported. 23 | #undef BOOST_HAS_INT128 24 | -------------------------------------------------------------------------------- /packages/boost/boost/config/compiler/sgi_mipspro.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright John Maddock 2001 - 2002. 2 | // Use, modification and distribution are subject to the 3 | // Boost Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | // See http://www.boost.org for most recent version. 7 | 8 | // SGI C++ compiler setup: 9 | 10 | #define BOOST_COMPILER "SGI Irix compiler version " BOOST_STRINGIZE(_COMPILER_VERSION) 11 | 12 | #include 13 | 14 | // 15 | // Threading support: 16 | // Turn this on unconditionally here, it will get turned off again later 17 | // if no threading API is detected. 18 | // 19 | #define BOOST_HAS_THREADS 20 | #define BOOST_NO_TWO_PHASE_NAME_LOOKUP 21 | 22 | #undef BOOST_NO_SWPRINTF 23 | #undef BOOST_DEDUCED_TYPENAME 24 | 25 | // 26 | // version check: 27 | // probably nothing to do here? 28 | 29 | 30 | -------------------------------------------------------------------------------- /packages/boost/boost/config/header_deprecated.hpp: -------------------------------------------------------------------------------- 1 | #ifndef BOOST_CONFIG_HEADER_DEPRECATED_HPP_INCLUDED 2 | #define BOOST_CONFIG_HEADER_DEPRECATED_HPP_INCLUDED 3 | 4 | // Copyright 2017 Peter Dimov. 5 | // 6 | // Distributed under the Boost Software License, Version 1.0. 7 | // 8 | // See accompanying file LICENSE_1_0.txt or copy at 9 | // http://www.boost.org/LICENSE_1_0.txt 10 | // 11 | // BOOST_HEADER_DEPRECATED("") 12 | // 13 | // Expands to the equivalent of 14 | // BOOST_PRAGMA_MESSAGE("This header is deprecated. Use instead.") 15 | // 16 | // Note that this header is C compatible. 17 | 18 | #include 19 | 20 | #if defined(BOOST_ALLOW_DEPRECATED_HEADERS) || defined(BOOST_ALLOW_DEPRECATED) 21 | # define BOOST_HEADER_DEPRECATED(a) 22 | #else 23 | # define BOOST_HEADER_DEPRECATED(a) BOOST_PRAGMA_MESSAGE("This header is deprecated. Use " a " instead.") 24 | #endif 25 | 26 | #endif // BOOST_CONFIG_HEADER_DEPRECATED_HPP_INCLUDED 27 | -------------------------------------------------------------------------------- /packages/boost/boost/config/no_tr1/cmath.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright John Maddock 2008. 2 | // Use, modification and distribution are subject to the 3 | // Boost Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | // 6 | // The aim of this header is just to include but to do 7 | // so in a way that does not result in recursive inclusion of 8 | // the Boost TR1 components if boost/tr1/tr1/cmath is in the 9 | // include search path. We have to do this to avoid circular 10 | // dependencies: 11 | // 12 | 13 | #ifndef BOOST_CONFIG_CMATH 14 | # define BOOST_CONFIG_CMATH 15 | 16 | # ifndef BOOST_TR1_NO_RECURSION 17 | # define BOOST_TR1_NO_RECURSION 18 | # define BOOST_CONFIG_NO_CMATH_RECURSION 19 | # endif 20 | 21 | # include 22 | 23 | # ifdef BOOST_CONFIG_NO_CMATH_RECURSION 24 | # undef BOOST_TR1_NO_RECURSION 25 | # undef BOOST_CONFIG_NO_CMATH_RECURSION 26 | # endif 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /packages/boost/boost/config/no_tr1/complex.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright John Maddock 2005. 2 | // Use, modification and distribution are subject to the 3 | // Boost Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | // 6 | // The aim of this header is just to include but to do 7 | // so in a way that does not result in recursive inclusion of 8 | // the Boost TR1 components if boost/tr1/tr1/complex is in the 9 | // include search path. We have to do this to avoid circular 10 | // dependencies: 11 | // 12 | 13 | #ifndef BOOST_CONFIG_COMPLEX 14 | # define BOOST_CONFIG_COMPLEX 15 | 16 | # ifndef BOOST_TR1_NO_RECURSION 17 | # define BOOST_TR1_NO_RECURSION 18 | # define BOOST_CONFIG_NO_COMPLEX_RECURSION 19 | # endif 20 | 21 | # include 22 | 23 | # ifdef BOOST_CONFIG_NO_COMPLEX_RECURSION 24 | # undef BOOST_TR1_NO_RECURSION 25 | # undef BOOST_CONFIG_NO_COMPLEX_RECURSION 26 | # endif 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /packages/boost/boost/config/no_tr1/functional.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright John Maddock 2005. 2 | // Use, modification and distribution are subject to the 3 | // Boost Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | // 6 | // The aim of this header is just to include but to do 7 | // so in a way that does not result in recursive inclusion of 8 | // the Boost TR1 components if boost/tr1/tr1/functional is in the 9 | // include search path. We have to do this to avoid circular 10 | // dependencies: 11 | // 12 | 13 | #ifndef BOOST_CONFIG_FUNCTIONAL 14 | # define BOOST_CONFIG_FUNCTIONAL 15 | 16 | # ifndef BOOST_TR1_NO_RECURSION 17 | # define BOOST_TR1_NO_RECURSION 18 | # define BOOST_CONFIG_NO_FUNCTIONAL_RECURSION 19 | # endif 20 | 21 | # include 22 | 23 | # ifdef BOOST_CONFIG_NO_FUNCTIONAL_RECURSION 24 | # undef BOOST_TR1_NO_RECURSION 25 | # undef BOOST_CONFIG_NO_FUNCTIONAL_RECURSION 26 | # endif 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /packages/boost/boost/config/no_tr1/memory.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright John Maddock 2005. 2 | // Use, modification and distribution are subject to the 3 | // Boost Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | // 6 | // The aim of this header is just to include but to do 7 | // so in a way that does not result in recursive inclusion of 8 | // the Boost TR1 components if boost/tr1/tr1/memory is in the 9 | // include search path. We have to do this to avoid circular 10 | // dependencies: 11 | // 12 | 13 | #ifndef BOOST_CONFIG_MEMORY 14 | # define BOOST_CONFIG_MEMORY 15 | 16 | # ifndef BOOST_TR1_NO_RECURSION 17 | # define BOOST_TR1_NO_RECURSION 18 | # define BOOST_CONFIG_NO_MEMORY_RECURSION 19 | # endif 20 | 21 | # include 22 | 23 | # ifdef BOOST_CONFIG_NO_MEMORY_RECURSION 24 | # undef BOOST_TR1_NO_RECURSION 25 | # undef BOOST_CONFIG_NO_MEMORY_RECURSION 26 | # endif 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /packages/boost/boost/config/no_tr1/utility.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright John Maddock 2005. 2 | // Use, modification and distribution are subject to the 3 | // Boost Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | // 6 | // The aim of this header is just to include but to do 7 | // so in a way that does not result in recursive inclusion of 8 | // the Boost TR1 components if boost/tr1/tr1/utility is in the 9 | // include search path. We have to do this to avoid circular 10 | // dependencies: 11 | // 12 | 13 | #ifndef BOOST_CONFIG_UTILITY 14 | # define BOOST_CONFIG_UTILITY 15 | 16 | # ifndef BOOST_TR1_NO_RECURSION 17 | # define BOOST_TR1_NO_RECURSION 18 | # define BOOST_CONFIG_NO_UTILITY_RECURSION 19 | # endif 20 | 21 | # include 22 | 23 | # ifdef BOOST_CONFIG_NO_UTILITY_RECURSION 24 | # undef BOOST_TR1_NO_RECURSION 25 | # undef BOOST_CONFIG_NO_UTILITY_RECURSION 26 | # endif 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /packages/boost/boost/config/platform/aix.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright John Maddock 2001 - 2002. 2 | // Use, modification and distribution are subject to the 3 | // Boost Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | // See http://www.boost.org for most recent version. 7 | 8 | // IBM/Aix specific config options: 9 | 10 | #define BOOST_PLATFORM "IBM Aix" 11 | 12 | #define BOOST_HAS_UNISTD_H 13 | #define BOOST_HAS_NL_TYPES_H 14 | #define BOOST_HAS_NANOSLEEP 15 | #define BOOST_HAS_CLOCK_GETTIME 16 | 17 | // This needs support in "boost/cstdint.hpp" exactly like FreeBSD. 18 | // This platform has header named which includes all 19 | // the things needed. 20 | #define BOOST_HAS_STDINT_H 21 | 22 | // Threading API's: 23 | #define BOOST_HAS_PTHREADS 24 | #define BOOST_HAS_PTHREAD_DELAY_NP 25 | #define BOOST_HAS_SCHED_YIELD 26 | //#define BOOST_HAS_PTHREAD_YIELD 27 | 28 | // boilerplate code: 29 | #include 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /packages/boost/boost/config/platform/amigaos.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright John Maddock 2002. 2 | // Use, modification and distribution are subject to the 3 | // Boost Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | // See http://www.boost.org for most recent version. 7 | 8 | #define BOOST_PLATFORM "AmigaOS" 9 | 10 | #define BOOST_DISABLE_THREADS 11 | #define BOOST_NO_CWCHAR 12 | #define BOOST_NO_STD_WSTRING 13 | #define BOOST_NO_INTRINSIC_WCHAR_T 14 | 15 | 16 | -------------------------------------------------------------------------------- /packages/boost/boost/config/platform/beos.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright John Maddock 2001. 2 | // Use, modification and distribution are subject to the 3 | // Boost Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | // See http://www.boost.org for most recent version. 7 | 8 | // BeOS specific config options: 9 | 10 | #define BOOST_PLATFORM "BeOS" 11 | 12 | #define BOOST_NO_CWCHAR 13 | #define BOOST_NO_CWCTYPE 14 | #define BOOST_HAS_UNISTD_H 15 | 16 | #define BOOST_HAS_BETHREADS 17 | 18 | #ifndef BOOST_DISABLE_THREADS 19 | # define BOOST_HAS_THREADS 20 | #endif 21 | 22 | // boilerplate code: 23 | #include 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /packages/boost/boost/config/platform/cloudabi.hpp: -------------------------------------------------------------------------------- 1 | // Copyright Nuxi, https://nuxi.nl/ 2015. 2 | // Distributed under the Boost Software License, Version 1.0. 3 | // (See accompanying file LICENSE_1_0.txt or copy at 4 | // http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #define BOOST_PLATFORM "CloudABI" 7 | 8 | #define BOOST_HAS_DIRENT_H 9 | #define BOOST_HAS_STDINT_H 10 | #define BOOST_HAS_UNISTD_H 11 | 12 | #define BOOST_HAS_CLOCK_GETTIME 13 | #define BOOST_HAS_EXPM1 14 | #define BOOST_HAS_GETTIMEOFDAY 15 | #define BOOST_HAS_LOG1P 16 | #define BOOST_HAS_NANOSLEEP 17 | #define BOOST_HAS_PTHREADS 18 | #define BOOST_HAS_SCHED_YIELD 19 | -------------------------------------------------------------------------------- /packages/boost/boost/config/platform/cray.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright John Maddock 2011. 2 | // Use, modification and distribution are subject to the 3 | // Boost Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | 7 | // See http://www.boost.org for most recent version. 8 | 9 | // SGI Irix specific config options: 10 | 11 | #define BOOST_PLATFORM "Cray" 12 | 13 | // boilerplate code: 14 | #define BOOST_HAS_UNISTD_H 15 | #include 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /packages/boost/boost/config/platform/haiku.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright Jessica Hamilton 2014. 2 | // Use, modification and distribution are subject to the 3 | // Boost Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | // See http://www.boost.org for most recent version. 7 | 8 | // Haiku specific config options: 9 | 10 | #define BOOST_PLATFORM "Haiku" 11 | 12 | #define BOOST_HAS_UNISTD_H 13 | #define BOOST_HAS_STDINT_H 14 | 15 | #ifndef BOOST_DISABLE_THREADS 16 | # define BOOST_HAS_THREADS 17 | #endif 18 | 19 | #define BOOST_NO_CXX11_HDR_TYPE_TRAITS 20 | #define BOOST_NO_CXX11_ATOMIC_SMART_PTR 21 | #define BOOST_NO_CXX11_STATIC_ASSERT 22 | #define BOOST_NO_CXX11_VARIADIC_MACROS 23 | 24 | // 25 | // thread API's not auto detected: 26 | // 27 | #define BOOST_HAS_SCHED_YIELD 28 | #define BOOST_HAS_GETTIMEOFDAY 29 | 30 | // boilerplate code: 31 | #include 32 | -------------------------------------------------------------------------------- /packages/boost/boost/config/platform/irix.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright John Maddock 2001 - 2003. 2 | // (C) Copyright Jens Maurer 2003. 3 | // Use, modification and distribution are subject to the 4 | // Boost Software License, Version 1.0. (See accompanying file 5 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | 7 | 8 | // See http://www.boost.org for most recent version. 9 | 10 | // SGI Irix specific config options: 11 | 12 | #define BOOST_PLATFORM "SGI Irix" 13 | 14 | #define BOOST_NO_SWPRINTF 15 | // 16 | // these are not auto detected by POSIX feature tests: 17 | // 18 | #define BOOST_HAS_GETTIMEOFDAY 19 | #define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE 20 | 21 | #ifdef __GNUC__ 22 | // GNU C on IRIX does not support threads (checked up to gcc 3.3) 23 | # define BOOST_DISABLE_THREADS 24 | #endif 25 | 26 | // boilerplate code: 27 | #define BOOST_HAS_UNISTD_H 28 | #include 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /packages/boost/boost/config/platform/qnxnto.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright Jim Douglas 2005. 2 | // Use, modification and distribution are subject to the 3 | // Boost Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | // See http://www.boost.org for most recent version. 7 | 8 | // QNX specific config options: 9 | 10 | #define BOOST_PLATFORM "QNX" 11 | 12 | #define BOOST_HAS_UNISTD_H 13 | #include 14 | 15 | // QNX claims XOpen version 5 compatibility, but doesn't have an nl_types.h 16 | // or log1p and expm1: 17 | #undef BOOST_HAS_NL_TYPES_H 18 | #undef BOOST_HAS_LOG1P 19 | #undef BOOST_HAS_EXPM1 20 | 21 | #define BOOST_HAS_PTHREADS 22 | #define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE 23 | 24 | #define BOOST_HAS_GETTIMEOFDAY 25 | #define BOOST_HAS_CLOCK_GETTIME 26 | #define BOOST_HAS_NANOSLEEP 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /packages/boost/boost/config/platform/solaris.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright John Maddock 2001 - 2003. 2 | // (C) Copyright Jens Maurer 2003. 3 | // Use, modification and distribution are subject to the 4 | // Boost Software License, Version 1.0. (See accompanying file 5 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | 7 | // See http://www.boost.org for most recent version. 8 | 9 | // sun specific config options: 10 | 11 | #define BOOST_PLATFORM "Sun Solaris" 12 | 13 | #define BOOST_HAS_GETTIMEOFDAY 14 | 15 | // boilerplate code: 16 | #define BOOST_HAS_UNISTD_H 17 | #include 18 | 19 | // 20 | // pthreads don't actually work with gcc unless _PTHREADS is defined: 21 | // 22 | #if defined(__GNUC__) && defined(_POSIX_THREADS) && !defined(_PTHREADS) 23 | # undef BOOST_HAS_PTHREADS 24 | #endif 25 | 26 | #define BOOST_HAS_STDINT_H 27 | #define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE 28 | #define BOOST_HAS_LOG1P 29 | #define BOOST_HAS_EXPM1 30 | 31 | 32 | -------------------------------------------------------------------------------- /packages/boost/boost/config/platform/vms.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright Artyom Beilis 2010. 2 | // Use, modification and distribution are subject to the 3 | // Boost Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #ifndef BOOST_CONFIG_PLATFORM_VMS_HPP 7 | #define BOOST_CONFIG_PLATFORM_VMS_HPP 8 | 9 | #define BOOST_PLATFORM "OpenVMS" 10 | 11 | #undef BOOST_HAS_STDINT_H 12 | #define BOOST_HAS_UNISTD_H 13 | #define BOOST_HAS_NL_TYPES_H 14 | #define BOOST_HAS_GETTIMEOFDAY 15 | #define BOOST_HAS_DIRENT_H 16 | #define BOOST_HAS_PTHREADS 17 | #define BOOST_HAS_NANOSLEEP 18 | #define BOOST_HAS_CLOCK_GETTIME 19 | #define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE 20 | #define BOOST_HAS_LOG1P 21 | #define BOOST_HAS_EXPM1 22 | #define BOOST_HAS_THREADS 23 | #undef BOOST_HAS_SCHED_YIELD 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /packages/boost/boost/config/platform/wasm.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright John Maddock 2020. 2 | // Use, modification and distribution are subject to the 3 | // Boost Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | // See http://www.boost.org for most recent version. 7 | 8 | // WASM specific config options: 9 | 10 | #define BOOST_PLATFORM "Wasm" 11 | 12 | #ifdef __has_include 13 | #if __has_include() 14 | # define BOOST_HAS_UNISTD_H 15 | #endif 16 | #endif 17 | 18 | // boilerplate code: 19 | #include 20 | // 21 | // fenv lacks the C++11 macros: 22 | // 23 | #define BOOST_NO_FENV_H 24 | -------------------------------------------------------------------------------- /packages/boost/boost/config/platform/zos.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2017 Dynatrace 2 | // 3 | // Distributed under the Boost Software License, Version 1.0. 4 | // See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt 6 | 7 | // See http://www.boost.org for most recent version. 8 | 9 | // Platform setup for IBM z/OS. 10 | 11 | #define BOOST_PLATFORM "IBM z/OS" 12 | 13 | #include // For __UU, __C99, __TR1, ... 14 | 15 | #if defined(__UU) 16 | # define BOOST_HAS_GETTIMEOFDAY 17 | #endif 18 | 19 | #if defined(_OPEN_THREADS) || defined(__SUSV3_THR) 20 | # define BOOST_HAS_PTHREADS 21 | # define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE 22 | # define BOOST_HAS_THREADS 23 | #endif 24 | 25 | #if defined(__SUSV3) || defined(__SUSV3_THR) 26 | # define BOOST_HAS_SCHED_YIELD 27 | #endif 28 | 29 | #define BOOST_HAS_SIGACTION 30 | #define BOOST_HAS_UNISTD_H 31 | #define BOOST_HAS_DIRENT_H 32 | #define BOOST_HAS_NL_TYPES_H 33 | -------------------------------------------------------------------------------- /packages/boost/boost/config/pragma_message.hpp: -------------------------------------------------------------------------------- 1 | #ifndef BOOST_CONFIG_PRAGMA_MESSAGE_HPP_INCLUDED 2 | #define BOOST_CONFIG_PRAGMA_MESSAGE_HPP_INCLUDED 3 | 4 | // Copyright 2017 Peter Dimov. 5 | // 6 | // Distributed under the Boost Software License, Version 1.0. 7 | // 8 | // See accompanying file LICENSE_1_0.txt or copy at 9 | // http://www.boost.org/LICENSE_1_0.txt 10 | // 11 | // BOOST_PRAGMA_MESSAGE("message") 12 | // 13 | // Expands to the equivalent of #pragma message("message") 14 | // 15 | // Note that this header is C compatible. 16 | 17 | #include 18 | 19 | #if defined(BOOST_DISABLE_PRAGMA_MESSAGE) 20 | # define BOOST_PRAGMA_MESSAGE(x) 21 | #elif defined(__INTEL_COMPILER) 22 | # define BOOST_PRAGMA_MESSAGE(x) __pragma(message(__FILE__ "(" BOOST_STRINGIZE(__LINE__) "): note: " x)) 23 | #elif defined(__GNUC__) 24 | # define BOOST_PRAGMA_MESSAGE(x) _Pragma(BOOST_STRINGIZE(message(x))) 25 | #elif defined(_MSC_VER) 26 | # define BOOST_PRAGMA_MESSAGE(x) __pragma(message(__FILE__ "(" BOOST_STRINGIZE(__LINE__) "): note: " x)) 27 | #else 28 | # define BOOST_PRAGMA_MESSAGE(x) 29 | #endif 30 | 31 | #endif // BOOST_CONFIG_PRAGMA_MESSAGE_HPP_INCLUDED 32 | -------------------------------------------------------------------------------- /packages/boost/boost/container/detail/config_end.hpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // (C) Copyright Ion Gaztanaga 2005-2013. Distributed under the Boost 4 | // Software License, Version 1.0. (See accompanying file 5 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // See http://www.boost.org/libs/container for documentation. 8 | // 9 | ////////////////////////////////////////////////////////////////////////////// 10 | #if defined BOOST_MSVC 11 | #pragma warning (pop) 12 | #endif 13 | 14 | #if defined(BOOST_GCC) && (BOOST_GCC >= 40600) 15 | #pragma GCC diagnostic pop 16 | #endif 17 | -------------------------------------------------------------------------------- /packages/boost/boost/container/detail/placement_new.hpp: -------------------------------------------------------------------------------- 1 | #ifndef BOOST_CONTAINER_DETAIL_PLACEMENT_NEW_HPP 2 | #define BOOST_CONTAINER_DETAIL_PLACEMENT_NEW_HPP 3 | /////////////////////////////////////////////////////////////////////////////// 4 | // 5 | // (C) Copyright Ion Gaztanaga 2014-2015. Distributed under the Boost 6 | // Software License, Version 1.0. (See accompanying file 7 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 8 | // 9 | // See http://www.boost.org/libs/container for documentation. 10 | // 11 | /////////////////////////////////////////////////////////////////////////////// 12 | 13 | #include 14 | 15 | struct boost_container_new_t{}; 16 | 17 | //avoid including 18 | inline void *operator new(std::size_t, void *p, boost_container_new_t) 19 | { return p; } 20 | 21 | inline void operator delete(void *, void *, boost_container_new_t) 22 | {} 23 | 24 | #endif //BOOST_CONTAINER_DETAIL_PLACEMENT_NEW_HPP 25 | -------------------------------------------------------------------------------- /packages/boost/boost/container/detail/value_functors.hpp: -------------------------------------------------------------------------------- 1 | #ifndef BOOST_CONTAINER_DETAIL_VALUE_FUNCTORS_HPP 2 | #define BOOST_CONTAINER_DETAIL_VALUE_FUNCTORS_HPP 3 | /////////////////////////////////////////////////////////////////////////////// 4 | // 5 | // (C) Copyright Ion Gaztanaga 2017-2017. Distributed under the Boost 6 | // Software License, Version 1.0. (See accompanying file 7 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 8 | // 9 | // See http://www.boost.org/libs/container for documentation. 10 | // 11 | /////////////////////////////////////////////////////////////////////////////// 12 | 13 | #ifndef BOOST_CONFIG_HPP 14 | # include 15 | #endif 16 | 17 | #if defined(BOOST_HAS_PRAGMA_ONCE) 18 | # pragma once 19 | #endif 20 | 21 | #include 22 | 23 | namespace boost { 24 | namespace container { 25 | 26 | using ::boost::intrusive::value_less; 27 | using ::boost::intrusive::value_equal; 28 | 29 | } //namespace container { 30 | } //namespace boost { 31 | 32 | #endif //BOOST_CONTAINER_DETAIL_VALUE_FUNCTORS_HPP 33 | -------------------------------------------------------------------------------- /packages/boost/boost/detail/workaround.hpp: -------------------------------------------------------------------------------- 1 | // Copyright David Abrahams 2002. 2 | // Distributed under the Boost Software License, Version 1.0. (See 3 | // accompanying file LICENSE_1_0.txt or copy at 4 | // http://www.boost.org/LICENSE_1_0.txt) 5 | #ifndef BOOST_WORKAROUND_DWA2002126_HPP 6 | #define BOOST_WORKAROUND_DWA2002126_HPP 7 | 8 | #include 9 | 10 | #endif // BOOST_WORKAROUND_DWA2002126_HPP 11 | -------------------------------------------------------------------------------- /packages/boost/boost/intrusive/detail/config_end.hpp: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////// 2 | // 3 | // (C) Copyright Ion Gaztanaga 2006-2013 4 | // 5 | // Distributed under the Boost Software License, Version 1.0. 6 | // (See accompanying file LICENSE_1_0.txt or copy at 7 | // http://www.boost.org/LICENSE_1_0.txt) 8 | // 9 | // See http://www.boost.org/libs/intrusive for documentation. 10 | // 11 | ///////////////////////////////////////////////////////////////////////////// 12 | 13 | #if defined BOOST_MSVC 14 | #pragma warning (pop) 15 | #endif 16 | -------------------------------------------------------------------------------- /packages/boost/boost/intrusive/detail/reverse_iterator.hpp: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////// 2 | // 3 | // (C) Copyright Ion Gaztanaga 2014-2014 4 | // 5 | // Distributed under the Boost Software License, Version 1.0. 6 | // (See accompanying file LICENSE_1_0.txt or copy at 7 | // http://www.boost.org/LICENSE_1_0.txt) 8 | // 9 | // See http://www.boost.org/libs/intrusive for documentation. 10 | // 11 | ///////////////////////////////////////////////////////////////////////////// 12 | 13 | #ifndef BOOST_INTRUSIVE_DETAIL_REVERSE_ITERATOR_HPP 14 | #define BOOST_INTRUSIVE_DETAIL_REVERSE_ITERATOR_HPP 15 | 16 | #include 17 | 18 | namespace boost { 19 | namespace intrusive { 20 | 21 | using boost::movelib::reverse_iterator; 22 | using boost::movelib::make_reverse_iterator; 23 | 24 | } //namespace intrusive { 25 | } //namespace boost { 26 | 27 | 28 | #endif //BOOST_INTRUSIVE_DETAIL_REVERSE_ITERATOR_HPP 29 | -------------------------------------------------------------------------------- /packages/boost/boost/move/detail/config_end.hpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // (C) Copyright Ion Gaztanaga 2012-2012. Distributed under the Boost 4 | // Software License, Version 1.0. (See accompanying file 5 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // See http://www.boost.org/libs/move for documentation. 8 | // 9 | ////////////////////////////////////////////////////////////////////////////// 10 | #if defined BOOST_MSVC 11 | # pragma warning (pop) 12 | #endif 13 | -------------------------------------------------------------------------------- /packages/boost/boost/move/detail/force_ptr.hpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // (C) Copyright Ion Gaztanaga 2014-2015. Distributed under the Boost 4 | // Software License, Version 1.0. (See accompanying file 5 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // See http://www.boost.org/libs/container for documentation. 8 | // 9 | ////////////////////////////////////////////////////////////////////////////// 10 | #ifndef BOOST_MOVE_DETAIL_FORCE_CAST_HPP 11 | #define BOOST_MOVE_DETAIL_FORCE_CAST_HPP 12 | 13 | #ifndef BOOST_CONFIG_HPP 14 | # include 15 | #endif 16 | 17 | #if defined(BOOST_HAS_PRAGMA_ONCE) 18 | # pragma once 19 | #endif 20 | 21 | #include 22 | 23 | namespace boost { 24 | namespace move_detail { 25 | 26 | 27 | template 28 | BOOST_MOVE_FORCEINLINE T force_ptr(const volatile void *p) 29 | { 30 | return static_cast(const_cast(p)); 31 | } 32 | 33 | } //namespace move_detail { 34 | } //namespace boost { 35 | 36 | #endif //#ifndef BOOST_MOVE_DETAIL_FORCE_CAST_HPP 37 | -------------------------------------------------------------------------------- /packages/boost/boost/move/detail/placement_new.hpp: -------------------------------------------------------------------------------- 1 | #ifndef BOOST_MOVE_DETAIL_PLACEMENT_NEW_HPP 2 | #define BOOST_MOVE_DETAIL_PLACEMENT_NEW_HPP 3 | /////////////////////////////////////////////////////////////////////////////// 4 | // 5 | // (C) Copyright Ion Gaztanaga 2014-2015. Distributed under the Boost 6 | // Software License, Version 1.0. (See accompanying file 7 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 8 | // 9 | // See http://www.boost.org/libs/container for documentation. 10 | // 11 | /////////////////////////////////////////////////////////////////////////////// 12 | 13 | #ifndef BOOST_CONFIG_HPP 14 | # include 15 | #endif 16 | 17 | #if defined(BOOST_HAS_PRAGMA_ONCE) 18 | # pragma once 19 | #endif 20 | 21 | struct boost_move_new_t{}; 22 | 23 | //avoid including 24 | inline void *operator new(std::size_t, void *p, boost_move_new_t) 25 | { return p; } 26 | 27 | inline void operator delete(void *, void *, boost_move_new_t) 28 | {} 29 | 30 | #endif //BOOST_MOVE_DETAIL_PLACEMENT_NEW_HPP 31 | -------------------------------------------------------------------------------- /packages/boost/boost/move/detail/std_ns_end.hpp: -------------------------------------------------------------------------------- 1 | #////////////////////////////////////////////////////////////////////////////// 2 | #// 3 | #// (C) Copyright Ion Gaztanaga 2015-2015. 4 | #// Distributed under the Boost Software License, Version 1.0. 5 | #// (See accompanying file LICENSE_1_0.txt or copy at 6 | #// http://www.boost.org/LICENSE_1_0.txt) 7 | #// 8 | #// See http://www.boost.org/libs/move for documentation. 9 | #// 10 | #////////////////////////////////////////////////////////////////////////////// 11 | #ifdef BOOST_MOVE_STD_NS_GCC_DIAGNOSTIC_PUSH 12 | #pragma GCC diagnostic pop 13 | #undef BOOST_MOVE_STD_NS_GCC_DIAGNOSTIC_PUSH 14 | #elif defined(_MSC_VER) && (_MSC_VER >= 1915) 15 | #pragma warning (pop) 16 | #endif //BOOST_MOVE_STD_NS_GCC_DIAGNOSTIC_PUSH 17 | -------------------------------------------------------------------------------- /packages/drafter/drafter-config.cmake: -------------------------------------------------------------------------------- 1 | include(CMakeFindDependencyMacro) 2 | find_dependency(apib 1.0) 3 | find_dependency(apib-parser 1.0) 4 | find_dependency(BoostContainer 1.66) 5 | find_dependency(cmdline 1.0) 6 | find_dependency(MPark.Variant 1.4) 7 | include("${CMAKE_CURRENT_LIST_DIR}/drafter-targets.cmake") 8 | -------------------------------------------------------------------------------- /packages/drafter/integration.cmake: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.6 FATAL_ERROR) 2 | 3 | find_program(Cucumber cucumber) 4 | add_test(NAME DrafterIntegration COMMAND ${Cucumber} .) 5 | set_property(TEST DrafterIntegration PROPERTY ENVIRONMENT "PATH=$ENV{PATH};${Drafter_BUILD_DIR}") 6 | 7 | -------------------------------------------------------------------------------- /packages/drafter/src/MsonMemberToApie.h: -------------------------------------------------------------------------------- 1 | // 2 | // MsonMemberToApie.h 3 | // drafter 4 | // 5 | // Created by Thomas Jandecka on 11/07/19. 6 | // Copyright (c) 2019 Apiary Inc. All rights reserved. 7 | // 8 | 9 | #ifndef DRAFTER_MSONMEMBERTOAPIE_H 10 | #define DRAFTER_MSONMEMBERTOAPIE_H 11 | 12 | #include 13 | #include 14 | #include 15 | 16 | #include "refract/ElementIfc.h" 17 | #include "NodeInfo.h" 18 | 19 | namespace drafter 20 | { 21 | class ConversionContext; 22 | } 23 | 24 | namespace drafter { 25 | std::unique_ptr MsonMemberToApie( // 26 | const NodeInfo& nodeInfo, 27 | ConversionContext&, 28 | mson::BaseTypeName, 29 | mson::BaseTypeName); 30 | 31 | std::unique_ptr MsonMemberToApie( // 32 | const NodeInfo& nodeInfo, 33 | ConversionContext&, 34 | mson::BaseTypeName, 35 | mson::BaseTypeName); 36 | } 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /packages/drafter/src/MsonOneOfSectionToApie.h: -------------------------------------------------------------------------------- 1 | // 2 | // MsonOneOfSectionToApie.h 3 | // drafter 4 | // 5 | // Created by Thomas Jandecka on 11/07/19. 6 | // Copyright (c) 2019 Apiary Inc. All rights reserved. 7 | // 8 | 9 | #ifndef DRAFTER_MSONONEOFSECTIONTOAPIE_H 10 | #define DRAFTER_MSONONEOFSECTIONTOAPIE_H 11 | 12 | #include 13 | #include 14 | #include 15 | 16 | #include "refract/ElementIfc.h" 17 | #include "NodeInfo.h" 18 | 19 | namespace drafter 20 | { 21 | class ConversionContext; 22 | 23 | std::unique_ptr MsonOneOfSectionToApie( // 24 | const mson::OneOf&, 25 | const snowcrash::SourceMap*, 26 | ConversionContext&); 27 | } 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /packages/drafter/src/NamedTypesRegistry.h: -------------------------------------------------------------------------------- 1 | // 2 | // NamedTypesRegistry.h 3 | // drafter 4 | // 5 | // Created by Jiri Kratochvil on 19-01-2016 6 | // Copyright (c) 2016 Apiary Inc. All rights reserved. 7 | // 8 | #ifndef DRAFTER_NAMEDTYPESREGISRTY_H 9 | #define DRAFTER_NAMEDTYPESREGISRTY_H 10 | 11 | #include "Blueprint.h" 12 | 13 | namespace refract 14 | { 15 | class Registry; 16 | } 17 | 18 | namespace drafter 19 | { 20 | 21 | template 22 | struct NodeInfo; 23 | 24 | class ConversionContext; 25 | 26 | void RegisterNamedTypes(const NodeInfo& elements, ConversionContext& context); 27 | } 28 | #endif // #ifndef DRAFTER_NAMEDTYPESREGISRTY_H 29 | -------------------------------------------------------------------------------- /packages/drafter/src/RefractAPI.h: -------------------------------------------------------------------------------- 1 | // 2 | // RefractAPI.h 3 | // drafter 4 | // 5 | // Created by Jiri Kratochvil on 31/07/15. 6 | // Copyright (c) 2015 Apiary Inc. All rights reserved. 7 | // 8 | 9 | #ifndef DRAFTER_REFRACTAST_H 10 | #define DRAFTER_REFRACTAST_H 11 | 12 | #include "Serialize.h" 13 | 14 | namespace snowcrash 15 | { 16 | struct SourceAnnotation; 17 | } 18 | 19 | namespace drafter 20 | { 21 | 22 | class ConversionContext; 23 | 24 | std::unique_ptr AnnotationToRefract( 25 | const snowcrash::SourceAnnotation& annotation, const std::string& key, ConversionContext& context); 26 | 27 | std::unique_ptr DataStructureToRefract( 28 | const NodeInfo& dataStructure, ConversionContext& context); 29 | std::unique_ptr BlueprintToRefract( 30 | const NodeInfo& blueprint, ConversionContext& context); 31 | } 32 | 33 | #endif // #ifndef DRAFTER_REFRACTAST_H 34 | -------------------------------------------------------------------------------- /packages/drafter/src/RefractDataStructure.h: -------------------------------------------------------------------------------- 1 | // 2 | // RefractDataStructure.h 3 | // drafter 4 | // 5 | // Created by Jiri Kratochvil on 18/05/15. 6 | // Copyright (c) 2015 Apiary Inc. All rights reserved. 7 | // 8 | 9 | #ifndef DRAFTER_REFRACTDATASTRUCTURE_H 10 | #define DRAFTER_REFRACTDATASTRUCTURE_H 11 | 12 | #include 13 | #include "refract/ElementIfc.h" 14 | #include "NodeInfo.h" 15 | 16 | namespace drafter 17 | { 18 | 19 | class ConversionContext; 20 | 21 | std::unique_ptr MSONToRefract( 22 | const NodeInfo& dataStructure, ConversionContext& context); 23 | std::unique_ptr ExpandRefract( 24 | std::unique_ptr element, ConversionContext& context); 25 | } 26 | 27 | #endif // #ifndef DRAFTER_REFRACTDATASTRUCTURE_H 28 | -------------------------------------------------------------------------------- /packages/drafter/src/Render.h: -------------------------------------------------------------------------------- 1 | // 2 | // Render.h 3 | // drafter 4 | // 5 | // Created by Pavan Kumar Sunkara on 17/06/15. 6 | // Copyright (c) 2015 Apiary Inc. All rights reserved. 7 | // 8 | 9 | #ifndef DRAFTER_RENDER_H 10 | #define DRAFTER_RENDER_H 11 | 12 | #include "Serialize.h" 13 | 14 | namespace drafter 15 | { 16 | 17 | enum RenderFormat 18 | { 19 | UndefinedRenderFormat = 0, // Undefined format 20 | JSONRenderFormat = 1, // JSON format 21 | JSONSchemaRenderFormat = 2 // JSON Schema format 22 | }; 23 | 24 | class ConversionContext; 25 | 26 | RenderFormat findRenderFormat(const std::string& contentType); 27 | std::string getContentTypeFromHeaders(const snowcrash::Headers& headers); 28 | } 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /packages/drafter/src/SerializeResult.h: -------------------------------------------------------------------------------- 1 | // 2 | // SerializeResult.h 3 | // drafter 4 | // 5 | // Created by Jiri Kratochvil on 27-02-2015 6 | // Copyright (c) 2015 Apiary Inc. All rights reserved. 7 | // 8 | 9 | #ifndef DRAFTER_SERIALIZERESULT_H 10 | #define DRAFTER_SERIALIZERESULT_H 11 | 12 | #include "Serialize.h" 13 | #include "SectionParserData.h" 14 | 15 | namespace snowcrash 16 | { 17 | struct SourceAnnotation; 18 | } 19 | 20 | namespace refract 21 | { 22 | struct IElement; 23 | } 24 | 25 | namespace drafter 26 | { 27 | 28 | class ConversionContext; 29 | 30 | std::unique_ptr WrapRefract( 31 | snowcrash::ParseResult& blueprint, ConversionContext& context); 32 | } 33 | 34 | #endif // #ifndef DRAFTER_SERIALIZERESULT_H 35 | -------------------------------------------------------------------------------- /packages/drafter/src/Version.h.in: -------------------------------------------------------------------------------- 1 | // 2 | // version.h.in 3 | // drafter 4 | // 5 | // Created by Jiri Kratochvil on 2019-11-28 6 | // 7 | // Copyright (c) 2019 Apiary Inc. All rights reserved. 8 | // 9 | 10 | #ifndef DRAFTER_VERSION_H 11 | #define DRAFTER_VERSION_H 12 | 13 | #define DRAFTER_MAJOR_VERSION @PROJECT_VERSION_MAJOR@ 14 | #define DRAFTER_MINOR_VERSION @PROJECT_VERSION_MINOR@ 15 | #define DRAFTER_PATCH_VERSION @PROJECT_VERSION_PATCH@ 16 | 17 | #define DRAFTER_VERSION_IS_RELEASE @DRAFTER_VERSION_IS_RELEASE@ 18 | #define DRAFTER_PRE_RELEASE_VERSION "@DRAFTER_PRE_RELEASE_VERSION@" 19 | 20 | #if DRAFTER_VERSION_IS_RELEASE 21 | #define DRAFTER_VERSION_STRING "v@PROJECT_VERSION@" 22 | #else 23 | #define DRAFTER_VERSION_STRING "v@PROJECT_VERSION@-@DRAFTER_PRE_RELEASE_VERSION@" 24 | #endif 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /packages/drafter/src/backend/Backend.h: -------------------------------------------------------------------------------- 1 | // 2 | // backend/Backend.h 3 | // apib::backend 4 | // 5 | // Created by Thomas Jandecka on 02/23/2020 6 | // Copyright (c) 2020 Apiary Inc. All rights reserved. 7 | // 8 | 9 | #ifndef APIB_BACKEND_H 10 | #define APIB_BACKEND_H 11 | 12 | #include 13 | 14 | namespace apib 15 | { 16 | namespace backend 17 | { 18 | template 19 | std::string serialize(const T& obj) 20 | { 21 | std::ostringstream s; 22 | s << obj; 23 | return s.str(); 24 | } 25 | } 26 | } 27 | #endif 28 | -------------------------------------------------------------------------------- /packages/drafter/src/backend/MediaTypeS11n.h: -------------------------------------------------------------------------------- 1 | // 2 | // backend/MediaTypeS11n.h 3 | // apib::backend 4 | // 5 | // Created by Thomas Jandecka on 02/21/2020 6 | // Copyright (c) 2020 Apiary Inc. All rights reserved. 7 | // 8 | 9 | #ifndef APIB_BACKEND_MEDIA_TYPE_H 10 | #define APIB_BACKEND_MEDIA_TYPE_H 11 | 12 | #include 13 | 14 | namespace apib 15 | { 16 | // FIXME: avoid depending on parser from backend by isolating MediaType 17 | // definition; then forward declare as, e. g., `apib::mediatype` 18 | namespace syntax 19 | { 20 | struct media_type; 21 | } 22 | 23 | namespace backend 24 | { 25 | std::ostream& operator<<(std::ostream&, const apib::syntax::media_type&); 26 | } 27 | } 28 | #endif 29 | -------------------------------------------------------------------------------- /packages/drafter/src/config.h: -------------------------------------------------------------------------------- 1 | // 2 | // vi:cin:et:sw=4 ts=4 3 | // 4 | // config.h - part of drafter 5 | // 6 | // Created by Jiri Kratochvil on 2015-02-13 7 | // Copyright (c) 2015 Apiary Inc. All rights reserved. 8 | // 9 | #ifndef DRAFTER_CONFIG_H 10 | #define DRAFTER_CONFIG_H 11 | 12 | #include 13 | 14 | #include "Serialize.h" 15 | 16 | struct Config { 17 | std::string input; 18 | bool lineNumbers; 19 | bool validate; 20 | drafter::SerializeFormat format; 21 | bool sourceMap; 22 | std::string output; 23 | bool enableLog; 24 | }; 25 | 26 | /** 27 | * \brief parse commandline params 28 | * 29 | * \param argc argc as received to main() 30 | * \param argv argv as received to main() 31 | * \param conf output - parsed parameters 32 | * 33 | * side effect - can call exit() if wrong params are sent to program 34 | */ 35 | void ParseCommadLineOptions(int argc, const char* argv[], /** out */ Config& conf); 36 | 37 | #endif /* end of include guard: DRAFTER_CONFIG_H */ 38 | -------------------------------------------------------------------------------- /packages/drafter/src/options.cc: -------------------------------------------------------------------------------- 1 | // 2 | // options.cc 3 | // drafter 4 | // 5 | // Created by Thomas Jandecka on 2020-02-04 6 | // Copyright (c) 2020 Apiary Inc. All rights reserved. 7 | // 8 | #include "options.h" 9 | 10 | bool drafter::is_name_required(const drafter_parse_options* opts) noexcept 11 | { 12 | return opts && opts->flags.test(drafter_parse_options::NAME_REQUIRED); 13 | } 14 | 15 | bool drafter::are_sourcemaps_included(const drafter_serialize_options* opts) noexcept 16 | { 17 | return opts && opts->flags.test(drafter_serialize_options::SOURCEMAPS_INCLUDED); 18 | } 19 | 20 | drafter_format drafter::get_format(const drafter_serialize_options* opts) noexcept 21 | { 22 | return opts ? opts->format : DRAFTER_SERIALIZE_YAML; 23 | } 24 | 25 | bool drafter::is_skip_gen_bodies(const drafter_parse_options* opts) noexcept 26 | { 27 | return opts && opts->flags.test(drafter_parse_options::SKIP_GEN_BODIES); 28 | } 29 | 30 | bool drafter::is_skip_gen_body_schemas(const drafter_parse_options* opts) noexcept 31 | { 32 | return opts && opts->flags.test(drafter_parse_options::SKIP_GEN_BODY_SCHEMAS); 33 | } 34 | -------------------------------------------------------------------------------- /packages/drafter/src/refract/Exception.h: -------------------------------------------------------------------------------- 1 | // 2 | // refract/Exception.h 3 | // librefract 4 | // 5 | // Created by Jiri Kratochvil on 21/05/15. 6 | // Copyright (c) 2015 Apiary Inc. All rights reserved. 7 | // 8 | #ifndef REFRACT_EXCEPTION_H 9 | #define REFRACT_EXCEPTION_H 10 | 11 | #include 12 | 13 | namespace refract 14 | { 15 | 16 | struct LogicError : std::logic_error { 17 | explicit LogicError(const std::string& msg) : std::logic_error(msg) {} 18 | }; 19 | 20 | // will be removed in future 21 | struct NotImplemented : std::runtime_error { 22 | explicit NotImplemented(const std::string& msg) : std::runtime_error(msg) {} 23 | }; 24 | 25 | struct Deprecated : std::logic_error { 26 | explicit Deprecated(const std::string& msg) : std::logic_error(msg) {} 27 | }; 28 | 29 | }; // namespace refract 30 | 31 | #endif // #ifndef REFRACT_EXCEPTION_H 32 | -------------------------------------------------------------------------------- /packages/drafter/src/refract/IsExpandableVisitor.h: -------------------------------------------------------------------------------- 1 | // 2 | // refract/IsExpandableVisitor.h 3 | // librefract 4 | // 5 | // Created by Jiri Kratochvil on 17/06/15. 6 | // Copyright (c) 2015 Apiary Inc. All rights reserved. 7 | // 8 | 9 | #ifndef REFRACT_ISEXPANDABLEVISITOR_H 10 | #define REFRACT_ISEXPANDABLEVISITOR_H 11 | 12 | namespace refract 13 | { 14 | 15 | class IsExpandableVisitor 16 | { 17 | 18 | bool result; 19 | 20 | public: 21 | IsExpandableVisitor(); 22 | 23 | template 24 | void operator()(const T& e); 25 | 26 | bool get() const; 27 | }; 28 | 29 | }; // namespace refract 30 | 31 | #endif // #ifndef REFRACT_EXPANDVISITOR_H 32 | -------------------------------------------------------------------------------- /packages/drafter/src/refract/JsonSchema.h: -------------------------------------------------------------------------------- 1 | // 2 | // refract/JsonSchema.h 3 | // librefract 4 | // 5 | // Created by Thomas Jandecka on 16/02/2018 6 | // Copyright (c) 2018 Apiary Inc. All rights reserved. 7 | // 8 | 9 | #ifndef REFRACT_JSON_SCHEMA_H 10 | #define REFRACT_JSON_SCHEMA_H 11 | 12 | #include "../utils/so/Value.h" 13 | 14 | #include "ElementIfc.h" 15 | 16 | namespace refract 17 | { 18 | namespace schema 19 | { 20 | drafter::utils::so::Object generateJsonSchema(const IElement& el); 21 | } 22 | } 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /packages/drafter/src/refract/JsonUtils.h: -------------------------------------------------------------------------------- 1 | // 2 | // refract/JsonUtils.h 3 | // librefract 4 | // 5 | // Created by Thomas Jandecka on 16/08/2018 6 | // Copyright (c) 2018 Apiary Inc. All rights reserved. 7 | // 8 | 9 | #ifndef REFRACT_JSON_UTILS_H 10 | #define REFRACT_JSON_UTILS_H 11 | 12 | #include "../utils/so/Value.h" 13 | #include "ElementFwd.h" 14 | 15 | namespace refract 16 | { 17 | namespace utils 18 | { 19 | drafter::utils::so::String instantiate(const dsd::String& e); 20 | drafter::utils::so::Number instantiate(const dsd::Number& e); 21 | drafter::utils::so::Value instantiate(const dsd::Boolean& e); 22 | 23 | drafter::utils::so::String instantiateEmpty(const StringElement& e); 24 | drafter::utils::so::Number instantiateEmpty(const NumberElement& e); 25 | drafter::utils::so::Value instantiateEmpty(const BooleanElement& e); 26 | } // namespace utils 27 | } // namespace refract 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /packages/drafter/src/refract/JsonValue.h: -------------------------------------------------------------------------------- 1 | // 2 | // refract/JsonValue.h 3 | // librefract 4 | // 5 | // Created by Thomas Jandecka on 12/07/2018 6 | // Copyright (c) 2018 Apiary Inc. All rights reserved. 7 | // 8 | 9 | #ifndef REFRACT_JSON_VALUE_H 10 | #define REFRACT_JSON_VALUE_H 11 | 12 | #include "../utils/so/Value.h" 13 | 14 | #include "ElementIfc.h" 15 | 16 | namespace refract 17 | { 18 | drafter::utils::so::Value generateJsonValue(const IElement& el); 19 | } // namespace refract 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /packages/drafter/src/refract/Query.cc: -------------------------------------------------------------------------------- 1 | #include "Query.h" 2 | #include "Element.h" 3 | 4 | namespace refract 5 | { 6 | 7 | namespace query 8 | { 9 | 10 | bool Element::operator()(const IElement& e) 11 | { 12 | return e.element() == name; 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /packages/drafter/src/refract/Query.h: -------------------------------------------------------------------------------- 1 | // 2 | // refract/Query.h 3 | // librefract 4 | // 5 | // Created by Jiri Kratochvil on 17/06/15. 6 | // Copyright (c) 2015 Apiary Inc. All rights reserved. 7 | // 8 | #ifndef REFRACT_QUERY_H 9 | #define REFRACT_QUERY_H 10 | 11 | #include "ElementIfc.h" 12 | 13 | #include 14 | #include 15 | 16 | namespace refract 17 | { 18 | 19 | namespace query 20 | { 21 | 22 | typedef std::function Query; 23 | 24 | class Element 25 | { 26 | const std::string name; 27 | 28 | public: 29 | Element(const std::string& name) : name(name) {} 30 | 31 | bool operator()(const IElement& e); 32 | }; 33 | }; 34 | 35 | }; // namespace refract 36 | 37 | #endif // #ifndef REFRACT_QUERY_H 38 | -------------------------------------------------------------------------------- /packages/drafter/src/refract/Registry.h: -------------------------------------------------------------------------------- 1 | // 2 | // refract/Registry.h 3 | // librefract 4 | // 5 | // Created by Jiri Kratochvil on 21/05/15. 6 | // Copyright (c) 2015 Apiary Inc. All rights reserved. 7 | // 8 | #ifndef REFRACT_REGISTRY_H 9 | #define REFRACT_REGISTRY_H 10 | 11 | #include 12 | #include 13 | #include 14 | 15 | #include "ElementIfc.h" 16 | 17 | namespace refract 18 | { 19 | class Registry 20 | { 21 | public: 22 | using type_map = std::map >; 23 | 24 | private: 25 | type_map types_; 26 | 27 | public: 28 | Registry(); 29 | 30 | public: 31 | const IElement* find(const std::string& name) const; 32 | 33 | bool add(std::unique_ptr element); 34 | bool remove(const std::string& name); 35 | void clear(); 36 | }; 37 | 38 | const IElement* FindRootAncestor(const std::string& name, const Registry& registry); 39 | 40 | } // namespace refract 41 | 42 | #endif // #ifndef REFRACT_REGISTRY_H 43 | -------------------------------------------------------------------------------- /packages/drafter/src/refract/SerializeSo.h: -------------------------------------------------------------------------------- 1 | // 2 | // refract/SerializeSo.h 3 | // librefract 4 | // 5 | // Created by Thomas Jandecka on 11/07/2018 6 | // Copyright (c) 2018 Apiary Inc. All rights reserved. 7 | // 8 | 9 | #ifndef REFRACT_SERIALIZE_H 10 | #define REFRACT_SERIALIZE_H 11 | 12 | #include "../utils/so/Value.h" 13 | #include "ElementIfc.h" 14 | 15 | namespace refract 16 | { 17 | namespace serialize 18 | { 19 | /// 20 | /// Translate an API Element tree to the Simple Object format. 21 | /// @note JSON and YAML serializers can be used on Simple Objects 22 | /// 23 | /// @param el API Element to be translated 24 | /// @param sourceMaps whether to print source maps; source maps on 25 | /// Annotation Elements are always rendered 26 | /// 27 | /// @return Simple Object value representing given tree 28 | /// 29 | drafter::utils::so::Value renderSo(const IElement& el, bool sourceMaps); 30 | 31 | } // namespace serialize 32 | } // namespace refract 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /packages/drafter/src/refract/dsd/Bool.cc: -------------------------------------------------------------------------------- 1 | // 2 | // refract/dsd/Bool.cc 3 | // librefract 4 | // 5 | // Created by Thomas Jandecka on 04/09/2017 6 | // Copyright (c) 2017 Apiary Inc. All rights reserved. 7 | // 8 | 9 | #include "Bool.h" 10 | 11 | #include "Traits.h" 12 | 13 | using namespace refract; 14 | using namespace dsd; 15 | 16 | const char* Boolean::name = "boolean"; 17 | 18 | static_assert(!supports_erase::value, ""); 19 | static_assert(!supports_empty::value, ""); 20 | static_assert(!supports_push_back::value, ""); 21 | static_assert(!supports_begin::value, ""); 22 | static_assert(!supports_end::value, ""); 23 | static_assert(!supports_size::value, ""); 24 | static_assert(!supports_erase::value, ""); 25 | static_assert(!supports_key::value, ""); 26 | static_assert(!supports_value::value, ""); 27 | static_assert(!supports_merge::value, ""); 28 | static_assert(!is_iterable::value, ""); 29 | static_assert(!is_pair::value, ""); 30 | 31 | bool dsd::operator==(const Boolean& l, const Boolean& r) noexcept 32 | { 33 | return l.get() == r.get(); 34 | } 35 | -------------------------------------------------------------------------------- /packages/drafter/src/refract/dsd/Null.cc: -------------------------------------------------------------------------------- 1 | // 2 | // refract/dsd/Null.cc 3 | // librefract 4 | // 5 | // Created by Thomas Jandecka on 04/09/2017 6 | // Copyright (c) 2017 Apiary Inc. All rights reserved. 7 | // 8 | 9 | #include "Null.h" 10 | 11 | #include "Traits.h" 12 | 13 | using namespace refract; 14 | using namespace dsd; 15 | 16 | const char* Null::name = "null"; 17 | 18 | static_assert(!supports_erase::value, ""); 19 | static_assert(!supports_empty::value, ""); 20 | static_assert(!supports_insert::value, ""); 21 | static_assert(!supports_push_back::value, ""); 22 | static_assert(!supports_begin::value, ""); 23 | static_assert(!supports_end::value, ""); 24 | static_assert(!supports_size::value, ""); 25 | static_assert(!supports_erase::value, ""); 26 | static_assert(!supports_key::value, ""); 27 | static_assert(!supports_value::value, ""); 28 | static_assert(!supports_merge::value, ""); 29 | static_assert(!is_iterable::value, ""); 30 | static_assert(!is_pair::value, ""); 31 | 32 | bool dsd::operator==(const Null&, const Null&) noexcept 33 | { 34 | return true; 35 | } 36 | -------------------------------------------------------------------------------- /packages/drafter/src/refract/dsd/Null.h: -------------------------------------------------------------------------------- 1 | // 2 | // refract/dsd/Null.h 3 | // librefract 4 | // 5 | // Created by Thomas Jandecka on 04/09/2017 6 | // Copyright (c) 2017 Apiary Inc. All rights reserved. 7 | // 8 | 9 | #ifndef REFRACT_DSD_NULL_H 10 | #define REFRACT_DSD_NULL_H 11 | 12 | namespace refract 13 | { 14 | namespace dsd 15 | { 16 | /// 17 | /// Data structure definition (DSD) of a Refract Null Element 18 | /// 19 | /// @remark Defined by its type 20 | /// 21 | class Null final 22 | { 23 | public: 24 | static const char* name; //< syntactical name of the DSD 25 | }; 26 | 27 | bool operator==(const Null&, const Null&) noexcept; 28 | } 29 | } 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /packages/drafter/src/refract/dsd/Utils.h: -------------------------------------------------------------------------------- 1 | // 2 | // refract/dsd/Utils.h 3 | // librefract 4 | // 5 | // Created by Thomas Jandecka on 07/11/2017 6 | // Copyright (c) 2017 Apiary Inc. All rights reserved. 7 | // 8 | 9 | #ifndef REFRACT_DSD_UTILS_H 10 | #define REFRACT_DSD_UTILS_H 11 | 12 | #include 13 | 14 | namespace refract 15 | { 16 | namespace utils 17 | { 18 | template 19 | void move_back(Container&) noexcept 20 | { 21 | // noop 22 | } 23 | 24 | template 25 | void move_back(Container& c, Arg&& arg, Args&&... args) 26 | { 27 | c.emplace_back(std::forward(arg)); 28 | move_back(c, std::forward(args)...); 29 | } 30 | } 31 | } 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /packages/drafter/src/reporting.h: -------------------------------------------------------------------------------- 1 | // 2 | // reporting.h 3 | // drafter 4 | // 5 | // Created by Jiri Kratochvil on 2015-02-13 6 | // Copyright (c) 2015 Apiary Inc. All rights reserved. 7 | // 8 | 9 | #ifndef DRAFTER_REPORTING_H 10 | #define DRAFTER_REPORTING_H 11 | 12 | #include "drafter.h" 13 | #include "SourceAnnotation.h" 14 | 15 | /** 16 | * \brief Print parser report to stderr. 17 | * 18 | * \param report A parser report to print 19 | * \param source Source data 20 | * \param useLineNumbers True if the annotations needs to be printed by line and column number 21 | */ 22 | void PrintReport(const snowcrash::Report& report, const std::string& source, const bool useLineNumbers); 23 | 24 | /** 25 | * \brief Print parser report to stderr. 26 | * 27 | * \param report A parser report to print 28 | * \param source Source data 29 | * \param useLineNumbers True if the annotations needs to be printed by line and column number 30 | * \param error - code form parsing 31 | */ 32 | void PrintReport(const drafter_result*, const std::string& source, const bool useLineNumbers, const int error); 33 | 34 | #endif // #ifndef DRAFTER_REPORTING_H 35 | -------------------------------------------------------------------------------- /packages/drafter/src/utils/so/JsonIo.h: -------------------------------------------------------------------------------- 1 | // 2 | // utils/so/JsonIo.h 3 | // librefract 4 | // 5 | // Created by Thomas Jandecka on 23/01/2018 6 | // Copyright (c) 2018 Apiary Inc. All rights reserved. 7 | // 8 | 9 | #ifndef DRAFTER_UTILS_SO_JSONIO_H 10 | #define DRAFTER_UTILS_SO_JSONIO_H 11 | 12 | #include "Value.h" 13 | 14 | namespace drafter 15 | { 16 | namespace utils 17 | { 18 | namespace so 19 | { 20 | struct packed { 21 | }; 22 | 23 | std::ostream& serialize_json(std::ostream& out, const Value& obj); 24 | std::ostream& serialize_json(std::ostream& out, const Value& obj, packed); 25 | } 26 | } 27 | } 28 | #endif 29 | -------------------------------------------------------------------------------- /packages/drafter/src/utils/so/YamlIo.h: -------------------------------------------------------------------------------- 1 | // 2 | // utils/so/YamlIo.h 3 | // librefract 4 | // 5 | // Created by Thomas Jandecka on 07/02/2018 6 | // Copyright (c) 2018 Apiary Inc. All rights reserved. 7 | // 8 | 9 | #ifndef DRAFTER_UTILS_SO_YAMLIO_H 10 | #define DRAFTER_UTILS_SO_YAMLIO_H 11 | 12 | #include "Value.h" 13 | 14 | namespace drafter 15 | { 16 | namespace utils 17 | { 18 | namespace so 19 | { 20 | std::ostream& serialize_yaml(std::ostream& out, const Value& obj); 21 | } 22 | } 23 | } 24 | #endif 25 | -------------------------------------------------------------------------------- /packages/drafter/test/ctesting.h: -------------------------------------------------------------------------------- 1 | #ifndef DRAFTER_CTESTING_H 2 | #define DRAFTER_CTESTING_H 3 | 4 | #include 5 | 6 | #define FAIL(expr) drafter_ctest_fail(#expr, __FILE__, __LINE__) 7 | void drafter_ctest_fail(const char* expr, const char* file, size_t line); 8 | 9 | #define REQUIRE(expr) drafter_ctest_assert(expr != 0, #expr, __FILE__, __LINE__) 10 | void drafter_ctest_assert(int a, const char* expr, const char* file, size_t line); 11 | 12 | #define REQUIRE_INCLUDES(searched, actual) drafter_ctest_includes(searched, actual, __FILE__, __LINE__) 13 | void drafter_ctest_includes(const char* expected, const char* actual, const char* file, size_t line); 14 | 15 | #define REQUIRE_EXCLUDES(searched, actual) drafter_ctest_excludes(searched, actual, __FILE__, __LINE__) 16 | void drafter_ctest_excludes(const char* expected, const char* actual, const char* file, size_t line); 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/api/action-attributes.apib: -------------------------------------------------------------------------------- 1 | # API name 2 | 3 | # Group Users 4 | 5 | ## User [/users] 6 | 7 | ### List all users [GET] 8 | 9 | + Attributes 10 | + username: pavan 11 | 12 | + Response 200 13 | 14 | [] 15 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/api/action-parameters.apib: -------------------------------------------------------------------------------- 1 | # API name 2 | 3 | # Group Users 4 | 5 | ## User [/users/{id}{?country,active,votes}] 6 | 7 | ### Retrieve User [GET] 8 | 9 | + Parameters 10 | + id: pavan (string, required) - Username 11 | + country 12 | + active (boolean) 13 | + votes (number) 14 | 15 | + Response 200 (application/json) 16 | 17 | {} 18 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/api/action-request-attributes.apib: -------------------------------------------------------------------------------- 1 | # API name 2 | 3 | # Group Users 4 | 5 | ## User [/users] 6 | 7 | ### Create User [POST] 8 | 9 | + Attributes 10 | + username: pavan 11 | 12 | + Request (application/json) 13 | 14 | + Response 204 15 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/api/action.apib: -------------------------------------------------------------------------------- 1 | # API name 2 | 3 | # Group Users 4 | 5 | ## User [/users] 6 | 7 | ### List all users [GET] 8 | 9 | Get the list of all the users 10 | 11 | + Response 200 12 | 13 | [] 14 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/api/advanced-action.apib: -------------------------------------------------------------------------------- 1 | # API name 2 | 3 | # Group Users 4 | 5 | ## User [/users] 6 | 7 | ### List all users [GET /users/all] 8 | 9 | + Response 200 10 | 11 | [] 12 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/api/asset.apib: -------------------------------------------------------------------------------- 1 | # API name 2 | 3 | # Group Users 4 | 5 | ## User [/users] 6 | 7 | ### List all users [GET] 8 | 9 | + Response 200 (application/json) 10 | + Attributes 11 | + username: pavan 12 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/api/attributes-array-nested-named-type.apib: -------------------------------------------------------------------------------- 1 | # Data Structures 2 | ## User 3 | + username: pksunkara 4 | 5 | ## Org 6 | + name: Apiary 7 | 8 | # Group Example 9 | # GET / 10 | + Response 200 (application/json) 11 | + Attributes (array[User, Org]) 12 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/api/attributes-named-type-enum-reference.apib: -------------------------------------------------------------------------------- 1 | # Data Structures 2 | ## A 3 | + a: valueA (B, required) 4 | 5 | ## B (enum) 6 | - valueB 7 | 8 | # Group Example 9 | # GET / 10 | + Response 200 (application/json) 11 | + Attributes (A) 12 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/api/attributes-named-type-member-reference.apib: -------------------------------------------------------------------------------- 1 | # Data Structures 2 | 3 | ## A (object) 4 | + a (B) 5 | 6 | ## B 7 | + b: b 8 | 9 | # Group Example 10 | # GET / 11 | + Response 200 (application/json) 12 | + Attributes (A) 13 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/api/attributes-named-type-mixin.apib: -------------------------------------------------------------------------------- 1 | FORMAT: 1A 2 | 3 | # Example 4 | 5 | # Data Structures 6 | ## A (object) 7 | + Include B 8 | 9 | ## B (object) 10 | + b: b 11 | 12 | # Group Example 13 | # GET / 14 | + Response 200 (application/json) 15 | + Attributes (A) 16 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/api/attributes-references.apib: -------------------------------------------------------------------------------- 1 | # API name 2 | 3 | # Group Users 4 | 5 | ## User [/users] 6 | 7 | ### List all users [GET] 8 | 9 | + Response 200 (application/json) 10 | + Attributes 11 | + user (User) 12 | 13 | # Data Structures 14 | 15 | ## User 16 | + name: John 17 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/api/data-structure.apib: -------------------------------------------------------------------------------- 1 | # API name 2 | 3 | # Data Structures 4 | 5 | ## User (object) 6 | + id (number) 7 | + username - Username of the user 8 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/api/description.apib: -------------------------------------------------------------------------------- 1 | # API name 2 | 3 | This is an API description 4 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/api/description.json: -------------------------------------------------------------------------------- 1 | { 2 | "element": "parseResult", 3 | "content": [ 4 | { 5 | "element": "category", 6 | "meta": { 7 | "classes": { 8 | "element": "array", 9 | "content": [ 10 | { 11 | "element": "string", 12 | "content": "api" 13 | } 14 | ] 15 | }, 16 | "title": { 17 | "element": "string", 18 | "content": "API name" 19 | } 20 | }, 21 | "content": [ 22 | { 23 | "element": "copy", 24 | "content": "This is an API description" 25 | } 26 | ] 27 | } 28 | ] 29 | } 30 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/api/headers.apib: -------------------------------------------------------------------------------- 1 | # API name 2 | 3 | # Group Users 4 | 5 | ## User [/users] 6 | 7 | ### List all users [GET] 8 | 9 | + Response 200 (application/json) 10 | 11 | + Headers 12 | 13 | X-server: nginx 14 | 15 | + Body 16 | 17 | [] 18 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/api/issue-386.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # GET / 3 | 4 | + Response 200 5 | + Attributes 6 | + a (A) 7 | 8 | + Response 201 9 | + Attributes (A) 10 | 11 | + Response 202 12 | + Attributes 13 | + (A) 14 | 15 | + Response 203 16 | + Attributes (array) 17 | + (A) 18 | 19 | 20 | ## Data Structures 21 | ### A 22 | description 23 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/api/issue-702.apib: -------------------------------------------------------------------------------- 1 | # API name 2 | 3 | ## Group Instances 4 | 5 | ### Instance Model [/{instance-id}] 6 | 7 | 8 | ## Group Profiles 9 | 10 | ### Profiles Collection [/profiles] 11 | 12 | #### Create Profile [POST] 13 | 14 | + Attributes (Profile) 15 | 16 | + Request (application/json) 17 | 18 | + Body 19 | 20 | {} 21 | 22 | + Schema 23 | 24 | {} 25 | 26 | 27 | ### Profile [/v1/profiles/{id}] 28 | 29 | + Attributes (Profile) 30 | 31 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/api/metadata.apib: -------------------------------------------------------------------------------- 1 | FORMAT: 1A 2 | HOST: https://example.com 3 | 4 | # API name 5 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/api/mixin-inheritance.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # GET / 3 | 4 | + Response 200 (application/json) 5 | + Attributes 6 | + Include Example 7 | 8 | # Data Structures 9 | 10 | ## Example (Other) 11 | + b 12 | 13 | ## Other 14 | + a 15 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/api/mson.apib: -------------------------------------------------------------------------------- 1 | # API name 2 | 3 | # Data Structures 4 | 5 | ## User 6 | User of the application 7 | 8 | ### Properties 9 | + username: pavan 10 | + id: 5 (number) - Id of the user 11 | + address 12 | + street 13 | + city 14 | + zip: 1234 (number) - zip description 15 | + *variable*: trololo 16 | + array (array) - array description 17 | - 3 18 | - 4 19 | - 5 20 | + inline array: 1,2,3 (array) - desc 21 | + multilined description - some dummy text 22 | 23 | and it continue there 24 | and will end there 25 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/api/payload-attributes.apib: -------------------------------------------------------------------------------- 1 | # API name 2 | 3 | # Group Users 4 | 5 | ## User [/users] 6 | 7 | ### List all users [GET] 8 | 9 | + Response 200 (application/json) 10 | 11 | + Attributes 12 | + username: pavan 13 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/api/relation.apib: -------------------------------------------------------------------------------- 1 | # API name 2 | 3 | # Group Users 4 | 5 | ## User [/users] 6 | 7 | ### List all users [GET] 8 | 9 | + Relation: list 10 | 11 | + Response 200 12 | 13 | [] 14 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/api/request-only.apib: -------------------------------------------------------------------------------- 1 | # API name 2 | 3 | # Group Users 4 | 5 | ## User [/users] 6 | 7 | ### List all users [GET] 8 | 9 | + Request 10 | 11 | {} 12 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/api/request-parameters.apib: -------------------------------------------------------------------------------- 1 | # API name 2 | 3 | # Group Users 4 | 5 | ## Users [/users{?limit}] 6 | 7 | ### List Users [GET] 8 | 9 | + Parameters 10 | + limit (number, optional) - The maximum number of users to return. 11 | + Default: `20` 12 | 13 | + Response 200 (application/json) 14 | 15 | [ 16 | { 17 | "username": "pksunkara" 18 | }, 19 | { 20 | "username": "kylef" 21 | } 22 | ] 23 | 24 | + Request Only one user 25 | 26 | + Parameters 27 | + limit: 1 28 | 29 | + Response 200 (application/json) 30 | 31 | [ 32 | { 33 | "username": "pksunkara" 34 | } 35 | ] 36 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/api/resource-attributes.apib: -------------------------------------------------------------------------------- 1 | # API name 2 | 3 | # Group Users 4 | 5 | ## User [/users] 6 | 7 | + Attributes 8 | + username: pavan 9 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/api/resource-group.apib: -------------------------------------------------------------------------------- 1 | # API name 2 | 3 | # Group Users 4 | 5 | User related endpoints 6 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/api/resource-parameters.apib: -------------------------------------------------------------------------------- 1 | # API name 2 | 3 | # Group Users 4 | 5 | ## User [/users/{id}] 6 | 7 | + Parameters 8 | + id: 23 (enum[number], optional) - Database ID 9 | 10 | Additional description 11 | 12 | + Default: 1 13 | 14 | + Members 15 | + 37 - Testing value 16 | + 1 17 | + 23 18 | 19 | ### Retrieve User [GET] 20 | 21 | + Response 200 (application/json) 22 | 23 | {} 24 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/api/resource.apib: -------------------------------------------------------------------------------- 1 | # API name 2 | 3 | # Group Users 4 | 5 | ## User [/users] 6 | 7 | Users resource 8 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/api/schema-body.apib: -------------------------------------------------------------------------------- 1 | # API name 2 | 3 | # Group Users 4 | 5 | ## User [/users] 6 | 7 | ### List all users [GET] 8 | 9 | + Response 200 (application/schema+json ; hello=world) 10 | + Attributes 11 | + username: pavan 12 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/api/schema-custom-json.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # GET / 3 | 4 | + Response 200 (application/json) 5 | + Attributes 6 | + name: kyle 7 | 8 | + Schema 9 | 10 | {"title": "Custom Schema"} 11 | 12 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/api/schema-custom.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # GET / 3 | 4 | + Response 200 (application/xml) 5 | + Schema 6 | 7 | 8 | 9 | + Attributes 10 | + name: kyle 11 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/api/transaction.apib: -------------------------------------------------------------------------------- 1 | # API name 2 | 3 | # Group Users 4 | 5 | ## User [/users] 6 | 7 | ### List all users [GET] 8 | 9 | + Request Normal 10 | 11 | {} 12 | 13 | + Response 200 14 | 15 | [] 16 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/api/xml-body.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # GET / 3 | 4 | + Response 200 (application/xml) 5 | + Attributes 6 | + name: kyle 7 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/circular/array-in-object.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # GET / 3 | + Response 200 (application/json) 4 | + Attributes (A) 5 | 6 | # Data Structures 7 | 8 | # A (object) 9 | - id: 1 10 | - data (array[A]) 11 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/circular/array.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # GET / 3 | + Response 200 (application/json) 4 | + Attributes (A) 5 | 6 | 7 | # Data Structures 8 | 9 | # A (array) 10 | - 1 11 | - (A) 12 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/circular/cross.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # GET / 3 | + Response 200 (application/json) 4 | + Attributes (A) 5 | 6 | 7 | # Data Structures 8 | 9 | # A 10 | - b (B) 11 | 12 | # B 13 | - a (A) 14 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/circular/embed.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # GET / 3 | + Response 200 (application/json) 4 | + Attributes (A) 5 | 6 | # Data Structures 7 | 8 | # A 9 | - b (B) 10 | 11 | # B 12 | - b (B) 13 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/circular/enum.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # GET / 3 | + Response 200 (application/json) 4 | + Attributes (A) 5 | 6 | # Data Structures 7 | 8 | # E (enum) 9 | - (A) 10 | - (array[A]) 11 | 12 | 13 | # A (object) 14 | - id: 1 15 | - data (E) 16 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/circular/mixed.apib: -------------------------------------------------------------------------------- 1 | 2 | # GET / 3 | + Response 200 (application/json) 4 | + Attributes (A) 5 | 6 | 7 | # Data Structures 8 | 9 | # A 10 | - member (B) 11 | 12 | # B 13 | - Include A 14 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/circular/mixin-cross.apib: -------------------------------------------------------------------------------- 1 | # GET / 2 | + Response 200 (application/json) 3 | + Attributes (A) 4 | 5 | # Data Structures 6 | 7 | # A 8 | - id: a 9 | - Include B 10 | 11 | # B 12 | - id: b 13 | - Include A 14 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/circular/mixin-embed.apib: -------------------------------------------------------------------------------- 1 | # GET / 2 | + Response 200 (application/json) 3 | + Attributes (A) 4 | 5 | # Data Structures 6 | 7 | # C 8 | - Include (C) 9 | 10 | # A 11 | - Include (B) 12 | 13 | # B 14 | - Include (C) 15 | 16 | 17 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/circular/mixin-identity.apib: -------------------------------------------------------------------------------- 1 | # GET / 2 | + Response 200 (application/json) 3 | + Attributes (A) 4 | 5 | # Data Structures 6 | 7 | # A 8 | - member 9 | - Include A 10 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/circular/mixin-member.apib: -------------------------------------------------------------------------------- 1 | # GET / 2 | + Response 200 (application/json) 3 | + Attributes (A) 4 | 5 | # Data Structures 6 | 7 | # A 8 | - member 9 | - Include A 10 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/circular/nested-enum.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apiaryio/drafter/8d77123fff15b606e08d6608cdea856530e550a2/packages/drafter/test/fixtures/circular/nested-enum.json -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/circular/simple.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # GET / 3 | + Response 200 (application/json) 4 | + Attributes (A) 5 | 6 | # Data Structures 7 | 8 | # A 9 | - a (A) 10 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/extend/circular.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | ## GET / 3 | + Response 200 (application/json) 4 | + Attributes (array) 5 | - (A) 6 | - (B) 7 | 8 | ## Data Structures 9 | 10 | ## A (enum) 11 | - (B) 12 | - (array[B]) 13 | 14 | ## B (enum) 15 | - (A) 16 | - (array[A]) 17 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/extend/complex.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # GET / 3 | + Response 200 (application/json) 4 | + Attributes (E) 5 | 6 | # Data Structures 7 | 8 | ## B (string) 9 | 10 | ## C 11 | + f (F) 12 | 13 | ## D 14 | + c (array[C]) 15 | 16 | ## E 17 | + d (D) 18 | 19 | ## F (enum) 20 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/extend/many.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | ## GET / 3 | + Response 200 (application/json; charset=utf-8) 4 | + Attributes(A) 5 | 6 | # Data Structures 7 | 8 | ## X (array) 9 | 10 | ## A 11 | - loc (X) 12 | 13 | ## O1 14 | ## O2 15 | ## O3 16 | ## O4 17 | ## O5 18 | ## O6 19 | ## O7 20 | ## O8 21 | ## O9 22 | ## O10 23 | ## O11 24 | ## O12 25 | ## O13 26 | ## O14 27 | ## O15 28 | ## O16 29 | ## O17 30 | ## O18 31 | ## O19 32 | ## O20 33 | ## O21 34 | ## O22 35 | ## O23 36 | 37 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/mson/array-reference.apib: -------------------------------------------------------------------------------- 1 | # Tesla 2 | 3 | # Data Structures 4 | ## User (object) 5 | + username: kyle 6 | 7 | # Group Example 8 | # GET /sample 9 | + Response 200 (application/json) 10 | + Attributes 11 | + data (object, required) 12 | + users (array, required) 13 | + (User) 14 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/mson/array-sample.apib: -------------------------------------------------------------------------------- 1 | 2 | # Data Structures 3 | 4 | ## ArraySample (array) 5 | 6 | description 7 | 8 | ### Members 9 | - a 10 | - b 11 | 12 | ### Sample 13 | - d 14 | - e 15 | 16 | ### Members 17 | - f 18 | - g 19 | 20 | ### Sample 21 | - h 22 | - j 23 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/mson/array-typed-content.apib: -------------------------------------------------------------------------------- 1 | # 2 | 3 | 4 | # Data Structures 5 | 6 | ## User (object) 7 | - nontyped array (array) 8 | - typed array (array[number,string, boolean]) 9 | - typed with values: 1,2,3 (array[number,string]) 10 | - strict type with values: 1,2,3 (array[number]) 11 | - typed with object (array[X]) 12 | - typed with generic (array[*T*]) 13 | 14 | ## X(object) 15 | - y 16 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/mson/check-bool-number-value-validity.apib: -------------------------------------------------------------------------------- 1 | 2 | # Data Structures 3 | 4 | ## num (number) 5 | ## int (num) 6 | 7 | ## A (array) 8 | + text (number) 9 | - 3 (number) 10 | - sample: non numeric value 11 | * 3 (boolean) 12 | - pět (int) 13 | 14 | ## C (int) 15 | ## Sample 16 | 3 17 | 18 | ## Sample 19 | sedm 20 | 21 | # Group Example 22 | # GET / 23 | + Response 200 (application/json) 24 | + Attributes (A) 25 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/mson/check-default-without-value.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # GET / 3 | + Response 200 4 | + Attributes 5 | + name (default) 6 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/mson/check-sample-without-value.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # GET / 3 | + Response 200 4 | + Attributes 5 | + name (sample) 6 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/mson/empty-sample.apib: -------------------------------------------------------------------------------- 1 | # 2 | 3 | 4 | # Data Structures 5 | 6 | ## User (object) 7 | - a (array) 8 | - sample 9 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/mson/enum-empty-default.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # GET / 3 | + Response 201 (application/json) 4 | + Attributes (A) 5 | 6 | # Data Structures 7 | 8 | ## A (object) 9 | + type: (enum) 10 | + Default 11 | + regular 12 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/mson/enum-members-description.apib: -------------------------------------------------------------------------------- 1 | 2 | # Data Structures 3 | 4 | # Color Set 5 | + color (enum) - basic color set 6 | + #ff0000 - red 7 | + #00ff00 - green 8 | + #0000ff - blue 9 | 10 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/mson/enum-multiple-default.apib: -------------------------------------------------------------------------------- 1 | 2 | # Data Structures 3 | 4 | # Enum behavior (object) 5 | - e1 (enum) 6 | - default 7 | - J 8 | - K 9 | 10 | - e2 (enum) 11 | 12 | - default 13 | - J 14 | 15 | - default 16 | - K 17 | 18 | 19 | - e3: a,b,c (enum, default) 20 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/mson/enum-sample.apib: -------------------------------------------------------------------------------- 1 | # Data Structures 2 | 3 | ## User (object) 4 | - e1: 3,4 (enum) 5 | 6 | - e2: 3,4 (enum, sample) 7 | 8 | - e3: *3,4* (enum) - FIXME: must be handled by different way in snowcrash 9 | 10 | - e4 (enum) - nontyped enum, samples should be by default string 11 | - sample 12 | - 3 13 | - 4 14 | 15 | - e5 (enum[number]) - typed enum -> samples && default should be numbers 16 | - sample 17 | - 3 18 | - 4 19 | - default 20 | - 1 21 | - sample 22 | - 5 23 | - 6 24 | 25 | - e6 (enum) - nontyped enum, by default string, but overided by type specification on content members 26 | - pavan (string) 27 | - 4 (number) 28 | 29 | - e7 (enum) - nontyped enum, by default string, but overided by type specification on content members 30 | - pavan (string) 31 | - *4* (number) 32 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/mson/enum.apib: -------------------------------------------------------------------------------- 1 | # 2 | 3 | 4 | # Data Structures 5 | 6 | ## User (object) 7 | - tag (enum[string]) 8 | - red 9 | - yellow 10 | - green 11 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/mson/enumerations.apib: -------------------------------------------------------------------------------- 1 | 2 | # Data Structures 3 | 4 | # Enums (object) 5 | - e1.1: 1 (enum) - C: 1, E: [1] 6 | 7 | - e1.2 (enum) - E: [1] 8 | - 1 9 | 10 | - e1.3: 1 (enum, sample) - S: [1], E: [1] 11 | 12 | - e1.4: 1 (enum, default) - D: 1, E[1] 13 | 14 | - e1.5 (enum) - E: [1], S:[1] 15 | - sample 16 | - 1 17 | 18 | - e1.6 (enum) - E: [1], D: 1 19 | - Default 20 | - 1 21 | 22 | 23 | - e2.1: 1,2,3 (enum) - E:[1,2,3] 24 | 25 | - e2.2 (enum) - E: [1,2,3] 26 | - 1 27 | - 2 28 | - 3 29 | 30 | - e2.3 : 1 (enum) C:1 E:[1,2,3] 31 | - 2 32 | - 3 33 | 34 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/mson/fixed-type-array-primitive-nested.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # GET / 3 | + Response 200 (application/json) 4 | + Attributes 5 | + s (array[string], fixed-type) 6 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/mson/group.apib: -------------------------------------------------------------------------------- 1 | # 2 | 3 | 4 | # Data Structures 5 | 6 | ## User (object) 7 | 8 | - One Of 9 | - full_name 10 | - Properties 11 | - first_name 12 | - last_name 13 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/mson/inheritance-primitive.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # GET /sample 3 | + Response 200 (application/json) 4 | + Attributes (Message) 5 | 6 | # Data Structures 7 | 8 | # Message 9 | + created (Date3) 10 | + text (string) 11 | 12 | # Date (string) 13 | 14 | ## Sample 15 | 2012-12-00 16 | 17 | # Date2 (Date1) 18 | ## Sample 19 | 2012-12-01 20 | 21 | # Date1 (Date) 22 | ## Sample 23 | 2012-12-01 24 | 25 | # Date3 (Date2) 26 | ## Sample 27 | 2012-12-03 28 | 29 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/mson/inheritance.apib: -------------------------------------------------------------------------------- 1 | # 2 | 3 | 4 | # Data Structures 5 | 6 | ## User (object) 7 | 8 | The User description 9 | 10 | ### Properties 11 | - login (string) - user name 12 | 13 | ## Customer (User) 14 | - id: 0 (number) - unique number 15 | 16 | ## Vip Customer (Customer) 17 | - discount: 15 (default, number) - in percent 0 - 100 18 | 19 | ## Other Customer (User) 20 | This object has no own members 21 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/mson/inner-inheritance.apib: -------------------------------------------------------------------------------- 1 | # 2 | 3 | 4 | # Data Structures 5 | 6 | ## User (object) 7 | - id (number) 8 | 9 | ## Person (object) 10 | - user (User) 11 | - noninherited 12 | 13 | 14 | ## Another Person (object) 15 | - level1 16 | - level2 (User) 17 | - level3 18 | - level4 (User) 19 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/mson/issue-682-b.apib: -------------------------------------------------------------------------------- 1 | # GET / 2 | 3 | + Response 200 (application/json) 4 | + Attributes (Array) 5 | + (object) 6 | 7 | ## Data Structures 8 | 9 | ### Array (array) 10 | 11 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/mson/issue-682.apib: -------------------------------------------------------------------------------- 1 | ## GET / 2 | 3 | + Response 200 (application/json) 4 | + Attributes (array[object]) 5 | + Thing 6 | 7 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/mson/issue-689.apib: -------------------------------------------------------------------------------- 1 | # API name 2 | 3 | # Group Visits 4 | 5 | ## Visits [/visits] 6 | 7 | ### Create a Visit [POST] 8 | 9 | + Response 200 (application/json) 10 | + Attributes (Visit) 11 | 12 | # Data Structures 13 | 14 | ## ContactInfo (object) 15 | 16 | + email: user@example.com (string) 17 | 18 | ## Visit (object) 19 | 20 | + monitor (enum) 21 | + (object) 22 | + Include ContactInfo 23 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/mson/issue-699.apib: -------------------------------------------------------------------------------- 1 | # GET / 2 | 3 | + Request (application/json) 4 | + Attributes 5 | + One Of 6 | + 7 | 8 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/mson/issue-709-b.apib: -------------------------------------------------------------------------------- 1 | # GET / 2 | 3 | + Response 200 (application/json) 4 | + Attributes 5 | + code (Post Code) 6 | 7 | # Data Structures 8 | 9 | ## Post Code (enum) 10 | 11 | + Include East Code 12 | 13 | ## East Code (enum) 14 | 15 | + EC2A 16 | + E1 17 | 18 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/mson/issue-709.apib: -------------------------------------------------------------------------------- 1 | # GET / 2 | 3 | + Response 200 (application/json) 4 | + Attributes 5 | + code (Post Code) 6 | 7 | # Data Structures 8 | 9 | ## Post Code (enum) 10 | 11 | + N1 12 | + Include East Code 13 | 14 | ## East Code (enum) 15 | 16 | + EC2A 17 | + E1 18 | 19 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/mson/issue-713.apib: -------------------------------------------------------------------------------- 1 | # My API 2 | 3 | ## Data Structures 4 | 5 | ### MyObject 6 | 7 | + key: `` (require) 8 | 9 | ## GET /{?a&b} 10 | 11 | + Response 200 (application/json) 12 | + Attributes (MyObject) 13 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/mson/issue-718.apib: -------------------------------------------------------------------------------- 1 | # API 2 | ## GET / 3 | 4 | + Response 200 (application/json) 5 | + Attributes 6 | + direction (enum) 7 | + `east` - a description 8 | + Default 9 | + `east` -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/mson/issue-749-1.apib: -------------------------------------------------------------------------------- 1 | # Data Structures 2 | ## WaveRecord (object) 3 | 4 | + status: `Processed` (enum, required) - The wave status. 5 | + Members 6 | + `Draft` - The wave has been created but not queued. 7 | + `Processed` - The wave has been processed. 8 | + `Queued` - The wave has been queued but not processed. 9 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/mson/issue-749-2.apib: -------------------------------------------------------------------------------- 1 | # Data Structures 2 | ## WaveRecord (object) 3 | 4 | + status: Processed, Queued, Done (enum, required) - The wave status. 5 | + Members 6 | + `Draft` - The wave has been created but not queued. 7 | + `Processed` - The wave has been processed. 8 | + `Queued` - The wave has been queued but not processed. 9 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/mson/issue-752.apib: -------------------------------------------------------------------------------- 1 | # My API 2 | 3 | ## GET / 4 | 5 | + Response 200 (application/json) 6 | + Attributes 7 | + One Of 8 | + Include (object) 9 | + key: value 10 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/mson/mixin-nonexistent.apib: -------------------------------------------------------------------------------- 1 | # 2 | 3 | 4 | # Data Structures 5 | 6 | ## User (object) 7 | 8 | FIXME: result of parsing `Include XXX` in snowcrash is now error. 9 | Because of nonexisting Mixin 10 | In future it should be possible to parse it correctly to allow Mixin referencing other document 11 | 12 | ## Properties 13 | - id 14 | - Include XXX 15 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/mson/mixin.apib: -------------------------------------------------------------------------------- 1 | # 2 | 3 | 4 | # Data Structures 5 | 6 | ## Address (object) 7 | mixin w/ description 8 | 9 | ### Properties 10 | - city 11 | - street 12 | 13 | ## User (object) 14 | - id 15 | - Include Address 16 | - nick 17 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/mson/multiline-description.apib: -------------------------------------------------------------------------------- 1 | # 2 | 3 | 4 | # Data Structures 5 | 6 | ## User (object) 7 | - name: Andrew (string) 8 | 9 | An additional 10 | multi-line description. 11 | 12 | - here 13 | - there 14 | 15 | - address (object) - address description 16 | 17 | multilined object 18 | description 19 | 20 | - Properties 21 | - m1 - this should be member of address 22 | 23 | # Properties 24 | 25 | - m2 - this should ... 26 | be member of user 27 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/mson/multiple-default.apib: -------------------------------------------------------------------------------- 1 | # 2 | 3 | 4 | # Data Structures 5 | 6 | ## User (object) 7 | - str: xyz (default) 8 | - sample: abc 9 | - sample: cde 10 | - default: fgh 11 | - default: ijk 12 | 13 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/mson/named-with-types.apib: -------------------------------------------------------------------------------- 1 | # 2 | 3 | 4 | # Data Structures 5 | 6 | ## EnumType (enum) 7 | - m1 8 | 9 | ## ArrayType (array) 10 | - m1 11 | 12 | ## ObjectType (object) 13 | - m1 14 | 15 | ## StringType (string) 16 | 17 | ## BooleanType (boolean) 18 | 19 | ## NumberType (number) 20 | 21 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/mson/nontyped-array-sample.apib: -------------------------------------------------------------------------------- 1 | # 2 | 3 | 4 | # Data Structures 5 | 6 | ## User (object) 7 | - na1: 1,2,3 (sample) 8 | - na2: *1,2,3* 9 | FIXME: we need clarify, if it is string sample, or array sample? 10 | snowcrash this parses as array with sample 11 | 12 | - na3: *1*,*2*,*3* - array of string samples 13 | - na4 - should be string w/ sample 14 | - sample: 1,2,3 15 | - na5 - string w/ multiline sample 16 | - sample 17 | - 1 18 | - 2 19 | - 3 20 | 21 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/mson/nontyped-array.apib: -------------------------------------------------------------------------------- 1 | # 2 | 3 | 4 | # Data Structures 5 | 6 | ## User (object) 7 | 8 | Description of User going there 9 | 10 | ### Properties 11 | - fibbonaci: 1,2,3 12 | - sample: 5,8,13 13 | - sample: 8,13,21 14 | - default: 1,2,3,5,8,13,21 15 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/mson/nontyped-object.apib: -------------------------------------------------------------------------------- 1 | # 2 | 3 | 4 | # Data Structures 5 | 6 | ## User (object) 7 | - address 8 | - street 9 | - name 10 | - house number 11 | - city 12 | - zip: 34567 13 | 14 | - hobby: inlining, swimming, run 15 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/mson/number-wrong-value.apib: -------------------------------------------------------------------------------- 1 | # 2 | 3 | 4 | # Data Structures 5 | 6 | ## User (object) 7 | 8 | It is number type, but input is string, we will convert it into 9 | Number Element, without content set. 10 | 11 | FIXME: In the future, we should try to parse it, but it might be a problem 12 | because of localized input (decimal point, thousand separators, etc.) 13 | 14 | ## Properties 15 | - some_number: Číslo (number) 16 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/mson/object-sample.apib: -------------------------------------------------------------------------------- 1 | # Data Structures 2 | 3 | ## ObjectSample 4 | 5 | description 6 | 7 | ### Properties 8 | - a 9 | - b 10 | 11 | ### Sample 12 | - a: 1 13 | - b: 2 14 | 15 | ### Properties 16 | - c: *3* 17 | - d 18 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/mson/oneof-sample.apib: -------------------------------------------------------------------------------- 1 | # 2 | 3 | 4 | # Data Structures 5 | 6 | ## User (object) 7 | 8 | - person (object) 9 | - One Of 10 | - full_name 11 | - Properties 12 | - first_name 13 | - last_name 14 | - Sample 15 | - full_name: Jiri Kratochvil 16 | - Sample 17 | - first_name: Jiri 18 | - last_name: Kratochvil 19 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/mson/oneof.apib: -------------------------------------------------------------------------------- 1 | # 2 | 3 | 4 | # Data Structures 5 | 6 | ## User (object) 7 | - city 8 | - One of 9 | - state: cz,sk (array) 10 | - province 11 | - sample: one 12 | - sample: uno 13 | - sample: jedna 14 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/mson/primitive-variables.apib: -------------------------------------------------------------------------------- 1 | # 2 | 3 | 4 | # Data Structures 5 | 6 | ## Color (string) 7 | ### Sample 8 | red 9 | 10 | 11 | ## User (object) 12 | 13 | - c1 - not variable 14 | - *c2* - this one is 15 | - *c3*: color value - var w/ value 16 | - *c4* (number) - var w/ type 17 | - *c5*: 3.14 (number) - var w/ type and value 18 | - *c6*: *example* - var w/ sample 19 | - *c7*: *3.14* (number) - var w/ type and value and sample 20 | - *c8 (Color)* - var w/ variable type 21 | - c9 (array[*T*]) - generic variable 22 | 23 | 24 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/mson/primitive-with-members.apib: -------------------------------------------------------------------------------- 1 | # 2 | 3 | 4 | # Data Structures 5 | 6 | ## StringType (string) 7 | - m1 8 | 9 | ## BooleanType (boolean) 10 | - m1 11 | 12 | ## NumberType (number) 13 | - m1 14 | 15 | ## NumericType (number) 16 | 17 | ### Properties 18 | - m1 19 | 20 | ## ObjectType (object) 21 | - m1 22 | 23 | 24 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/mson/primitives.apib: -------------------------------------------------------------------------------- 1 | # 2 | 3 | 4 | # Data Structures 5 | 6 | ## User (object) 7 | 8 | - id: 42 (number, required, default) 9 | - login: name (string) 10 | - banned: true (boolean, optional) - description of property 11 | - uid: 5 (number, optional) 12 | - default: -1 13 | - motto: content (string) - blaaaa blaa 14 | - default: carpe diem 15 | - sample: diem perdidi 16 | - sample: humppa forever 17 | 18 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/mson/reference-override.apib: -------------------------------------------------------------------------------- 1 | # Tesla 2 | 3 | # Data Structures 4 | ## User (object) 5 | + username: kyle 6 | 7 | # Group Example 8 | # GET /sample 9 | + Response 200 (application/json) 10 | + Attributes 11 | + data (object, required) 12 | + users (array, required) 13 | + (User) 14 | + relation: family 15 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/mson/regression-207.apib: -------------------------------------------------------------------------------- 1 | FORMAT: 1A 2 | 3 | ## Data Structures 4 | 5 | ### A 6 | 7 | ### B 8 | 9 | ### C 10 | 11 | ### D 12 | 13 | ### E 14 | 15 | ### F 16 | 17 | ### G 18 | 19 | ### H 20 | 21 | ### I 22 | 23 | ### J 24 | 25 | ### K 26 | 27 | ### L 28 | 29 | ### M 30 | 31 | ### N 32 | 33 | ### O 34 | 35 | ### P 36 | 37 | ### Q -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/mson/regression-267.apib: -------------------------------------------------------------------------------- 1 | ## Data Structures 2 | ### Object 3 | + thing (optional, array[]) 4 | + foo: bar 5 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/mson/regression-269.apib: -------------------------------------------------------------------------------- 1 | ## Data Structures 2 | ### X (X) 3 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/mson/resource-anonymous.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # / 3 | + Attributes 4 | + id 5 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/mson/resource-nested-inheritance.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # GET / 3 | + Response 200 (application/json) 4 | + Attributes 5 | + b 6 | + c (X) 7 | 8 | # Data Structures 9 | ## X 10 | + id: pavan 11 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/mson/resource-nested-member.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # GET / 3 | + Response 200 (application/json) 4 | + Attributes 5 | + a (array[X]) 6 | 7 | # Data Structures 8 | ## X 9 | + id: pavan 10 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/mson/resource-nested-mixin.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # GET / 3 | + Response 200 (application/json) 4 | + Attributes 5 | + b 6 | + c 7 | + Include X 8 | 9 | # Data Structures 10 | 11 | ## X 12 | + id: pavan 13 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/mson/resource-primitive-mixin.apib: -------------------------------------------------------------------------------- 1 | # Group Polls 2 | # Polls [/] 3 | + Attributes 4 | + Include string 5 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/mson/resource-resolve-basetype.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # Root [/] 3 | ## Retrieve the Entry Point [GET] 4 | + Response 200 (application/json) 5 | + Attributes 6 | + Properties 7 | + hello: 42 (string) 8 | + nested (Question) 9 | 10 | ## Group Question 11 | ## Question [/questions/{question_id}] 12 | + Attributes 13 | + question 14 | + url 15 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/mson/resource-unresolved-reference.apib: -------------------------------------------------------------------------------- 1 | # Polls [/] 2 | 3 | Error should be result of expansion for nonexistent structure 4 | 5 | ## Get a Poll [GET] 6 | 7 | + Attributes (Person) 8 | + id 9 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/mson/string-sample.apib: -------------------------------------------------------------------------------- 1 | # 2 | 3 | 4 | # Data Structures 5 | 6 | ## User (object) 7 | - s1: abc (sample) 8 | - s2: *abc* 9 | - s3 10 | - sample: abc 11 | 12 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/mson/type-attributes-payload.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # GET / 3 | + Response 200 (application/json) 4 | + Attributes 5 | + a (required, optional) 6 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/mson/type-attributes.apib: -------------------------------------------------------------------------------- 1 | # Data Structures 2 | # A 3 | + a: a (fixed, required, optional, default, sample, fixed-type) 4 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/mson/typed-array-sample.apib: -------------------------------------------------------------------------------- 1 | # 2 | 3 | 4 | # Data Structures 5 | 6 | ## User (object) 7 | - ta1: 1,2,3 (array, sample) 8 | - ta2: *1,2,3* (array) - not parsed correctly 9 | - ta3: *1*,*2*,*3* (array) - array of "string samples" 10 | - ta4 (array) 11 | - sample: 1,2,3 12 | - ta5 (array) 13 | - sample 14 | - 1 15 | - 2 16 | - 3 17 | 18 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/mson/typed-array.apib: -------------------------------------------------------------------------------- 1 | # 2 | 3 | 4 | # Data Structures 5 | 6 | ## User (object) 7 | 8 | Description of User going there 9 | 10 | ### Properties 11 | - login: nobody (string) 12 | - sample: quido 13 | 14 | - fibbonaci: 1,2,3 (array[number]) - Fibbonaci sequence 15 | - sample: 5,8,13 16 | - sample: 8,13,21 17 | - default: 1,2,3,5,8,13,21 18 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/mson/typed-object.apib: -------------------------------------------------------------------------------- 1 | # 2 | 3 | 4 | # Data Structures 5 | 6 | ## User (object) 7 | 8 | Description of User going there 9 | 10 | ### Properties 11 | 12 | - name (string) 13 | 14 | - address (object) 15 | - street (object) 16 | - name (string) 17 | - house number (number) 18 | - city (string) 19 | - zip (number) 20 | 21 | ### Properties 22 | 23 | - id (number) 24 | - hobby: sex, drugs, rock'n'roll (array) 25 | 26 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/mson/variable-property-name.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # GET / 3 | + Response 200 (application/json) 4 | + Attributes (A) 5 | 6 | # Data Structures 7 | 8 | ## StrSample (string) 9 | ### Sample 10 | str sample 11 | 12 | ## StrDefault (string) 13 | ### Default 14 | str default 15 | 16 | ## StrEmpty (string) 17 | 18 | ## StrObj (object) 19 | 20 | 21 | # A 22 | - s: start 23 | 24 | - *direct*: v1 25 | - *str (string)*: v2 26 | 27 | - *(StrSample)*: s1 28 | - *ss (StrSample)*: s2 29 | 30 | - *(StrDefault)*: d1 31 | - *sd (StrDefault)*: d2 32 | 33 | - *(StrEmpty)*: e1 34 | - *se (StrEmpty)*: e2 35 | 36 | - e: end 37 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/oneof/expanded.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # GET /ab 3 | - response 200 (application/json) 4 | - Attributes (A or B) 5 | 6 | # Data Structures 7 | 8 | ## A or B 9 | - One Of 10 | - Properties 11 | - text: A (string) 12 | - somevalue (C) 13 | 14 | - Properties 15 | - text: B (string) 16 | 17 | ## C 18 | - c1: C1 19 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/oneof/multi-oneof.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # GET / 3 | + Response 200 (application/json) 4 | + Attributes (Test) 5 | 6 | # Data Structures 7 | 8 | ## Test (object) 9 | + One of 10 | + month: `march` (string) 11 | + interval: 1 (number) 12 | + One of 13 | + numberOfOccurences: 5 (number) 14 | + endDate: `2015-04-08T12:30:00Z` (string) 15 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/oneof/multi-properties.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # GET / 3 | + Response 200 (application/json) 4 | + Attributes (Test) 5 | 6 | # Data Structures 7 | 8 | ## Test 9 | + One of 10 | + Properties 11 | + p1: 5 (number) 12 | + p2: `2015-04-08T12:30:00Z` (string) 13 | + p3 14 | + p3.1: a 15 | + p3.2: b 16 | + another 17 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/oneof/object.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # GET / 3 | + Response 200 (application/json) 4 | + Attributes (Test) 5 | 6 | # Data Structures 7 | 8 | ## Test (object) 9 | + One of 10 | + obj 11 | + m1: v1 12 | + m2: 2 (number) 13 | + arr: 1,2,3 (array[number]) 14 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/oneof/required.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # GET /ab 3 | - response 200 (application/json) 4 | - Attributes (Test) 5 | 6 | # Data Structures 7 | 8 | ## Test (object) 9 | - One Of 10 | - Properties 11 | - foo: A (string, required) 12 | 13 | - Properties 14 | - bar: B (string) 15 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/oneof/required2.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # GET /ab 3 | - response 200 (application/json) 4 | - Attributes (Test) 5 | 6 | # Data Structures 7 | 8 | ## Test (object) 9 | - One Of 10 | - Properties 11 | - foo: A (string, required) 12 | 13 | - bar: B (string, required) 14 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/oneof/simple.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # GET / 3 | + Response 200 (application/json) 4 | + Attributes (Test) 5 | 6 | # Data Structures 7 | 8 | ## Test (object) 9 | + One of 10 | + month: `march` (string) 11 | + interval: 1 (number) 12 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/parse-result/blueprint.apib: -------------------------------------------------------------------------------- 1 | FORMAT: 1A 2 | 3 | # test api 4 | this is a description of the test api 5 | # Group test 6 | A test group 7 | ## test [/test/{id}[2]] 8 | A test uri template 9 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/parse-result/error-warning.apib: -------------------------------------------------------------------------------- 1 | # GET / 2 | + Parameters 3 | + Response 204 4 | 5 | # Data Structures 6 | ## A (B) 7 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/parse-result/error.apib: -------------------------------------------------------------------------------- 1 | # GET / 2 | + Response 200 3 | 4 | {} 5 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/parse-result/mson.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # GET / 3 | + Response 200 (application/json) 4 | + Attributes (A) 5 | 6 | # Data Structures 7 | ## A 8 | + x: y 9 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/parse-result/simple.apib: -------------------------------------------------------------------------------- 1 | # GET / 2 | + Response 204 3 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/parse-result/warning.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # GET / 3 | + Parameters 4 | + Response 204 5 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/parse-result/warnings.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # GET / 3 | + Parameters 4 | + Response 204 5 | 6 | {} 7 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/render/action-request-attributes.apib: -------------------------------------------------------------------------------- 1 | # API name 2 | 3 | # Group Users 4 | 5 | ## User [/users] 6 | 7 | ### Create User [POST] 8 | 9 | + Attributes 10 | + username: pavan 11 | 12 | + Request (application/json) 13 | 14 | + Response 204 15 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/render/array-fixed-values.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # Resource [/example] 3 | 4 | ## Action [GET] 5 | 6 | + Response 200 (application/json) 7 | 8 | + Attributes 9 | - tags (array) 10 | - (string, fixed) 11 | - (number, fixed) 12 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/render/array-mixin.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # GET / 3 | + Response 200 (application/json) 4 | + Attributes (array) 5 | + Karlin 6 | + Include Address 7 | 8 | # Data Structures 9 | 10 | ## Address (array) 11 | + Prague 12 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/render/array-nested-array.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # GET / 3 | + Response 200 (application/json) 4 | + Attributes (array) 5 | + Karlin 6 | + (array) 7 | + Prague 8 | + (object) 9 | + zip: 34567 (number) 10 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/render/array-nested-object.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # GET / 3 | + Response 200 (application/json) 4 | + Attributes (array) 5 | + Karlin 6 | + (object) 7 | + city: Prague 8 | + zip: 34567 (number) 9 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/render/array-ref-array.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # GET / 3 | + Response 200 (application/json) 4 | + Attributes (array) 5 | + Karlin 6 | + (Address) 7 | 8 | # Data Structures 9 | 10 | ## Address (array) 11 | + Prague 12 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/render/array-ref-object.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # GET / 3 | + Response 200 (application/json) 4 | + Attributes (array) 5 | + Karlin 6 | + (Address) 7 | 8 | # Data Structures 9 | 10 | ## Address 11 | + city: Prague 12 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/render/array-samples.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # GET / 3 | 4 | + Response 200 (application/json) 5 | + Attributes 6 | + a1: d,f,l,t (default) 7 | + a2: s,m,p,l (sample) 8 | + a3 (array) 9 | - sample: 1,2,3 10 | - sample: 4,5,6,7 11 | 12 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/render/complex-object.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # GET / 3 | + Response 200 (application/json) 4 | + Attributes 5 | + id: 6161 (number) 6 | + user: pksunkara 7 | + active: false (boolean) 8 | + social 9 | + github 10 | + active: true (boolean) 11 | + id: 1234 (number) 12 | + uri: pksunkara (string) 13 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/render/content-type.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # GET / 3 | + Response 200 (application/json; charset=utf-8) 4 | + Attributes 5 | + user: pksunkara 6 | 7 | # GET /hal 8 | + Response 200 (application/hal+json) 9 | + Attributes 10 | + user: pksunkara 11 | 12 | # GET /typo 13 | + Response 200 (application/haljson) 14 | + Attributes 15 | + user: pksunkara 16 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/render/enum-default-multiple.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # GET / 3 | 4 | + Response 200 (application/json) 5 | + Attributes 6 | + enumField (enum) 7 | + Default: e 8 | + Default: f 9 | + Default: g 10 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/render/enum-default.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # GET / 3 | 4 | + Response 200 (application/json) 5 | + Attributes 6 | + enumField (enum) 7 | + Members 8 | + a 9 | + b 10 | + c 11 | + Default: c 12 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/render/enum-sample.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # GET / 3 | 4 | + Response 200 (application/json) 5 | + Attributes 6 | + enumField (enum) 7 | + Members 8 | + a 9 | + b 10 | + c 11 | + Sample: c 12 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/render/fixed-attributes-section.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # GET / 3 | + Response 200 (application/json) 4 | + Attributes (User, fixed) 5 | 6 | # Data Structures 7 | ## User 8 | + name: *pavan* 9 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/render/fixed-named-type.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # GET / 3 | + Response 200 (application/json) 4 | + Attributes (User) 5 | 6 | # Data Structures 7 | ## User (fixed) 8 | + name: *pavan* 9 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/render/inheritance-array-sample.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # GET / 3 | 4 | + Response 200 (application/json) 5 | + Attributes (RefSample) 6 | 7 | # Data Structures 8 | 9 | ## RefSample (array) 10 | - a 11 | - b 12 | 13 | ### Sample 14 | - c 15 | - d 16 | 17 | ### Default 18 | - e 19 | - f 20 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/render/inheritance-object-sample.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # GET / 3 | 4 | + Response 200 (application/json) 5 | + Attributes (RefObject) 6 | 7 | # Data Structures 8 | 9 | ## RefObject 10 | - r1: *v1* 11 | - r2: v2 (sample) 12 | - r3: v3 (default) 13 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/render/issue-246.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # GET / 3 | - Response 200 (application/json) 4 | - Attribute (A) 5 | 6 | # Data Structures 7 | 8 | ## O (object) 9 | - a (array) 10 | - subitem (object) 11 | 12 | ## A (array) 13 | - implicit 14 | - key1: value1 15 | 16 | - explicit (object) 17 | 18 | - named (O) 19 | 20 | - (array) 21 | - subitem (object) 22 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/render/issue-312.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # GET / 3 | - Response 200 (application/json) 4 | - Attribute 5 | - a (array[A]) 6 | - b (array) 7 | - (A) 8 | 9 | # Data Structures 10 | 11 | ## A (string) 12 | 13 | ### Sample 14 | B 15 | 16 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/render/issue-318.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # GET / 3 | - Response 200 (application/json) 4 | - Attribute (A) 5 | 6 | # Data Structures 7 | 8 | ## O (object) 9 | 10 | ## A 11 | - explicit: value (object) 12 | 13 | - implicit: value 14 | - key: value 15 | 16 | - named: value (O) 17 | 18 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/render/issue-328-1.apib: -------------------------------------------------------------------------------- 1 | ## C [/c] 2 | 3 | ### Add C([POST]) 4 | 5 | + Attributes (C) 6 | 7 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/render/issue-328-2.apib: -------------------------------------------------------------------------------- 1 | # API 2 | 3 | ## C [/c] 4 | 5 | ### Add C(`[POST 6 | + Attributes (C) 7 | 8 | ## Data Structures 9 | 10 | ## C (object) 11 | 12 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/render/issue-547.apib: -------------------------------------------------------------------------------- 1 | ## GET / 2 | 3 | + Response 200 (application/json) 4 | + Attributes 5 | + (array) 6 | + foo 7 | + bar 8 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/render/issue-556.apib: -------------------------------------------------------------------------------- 1 | FORMAT: 1A 2 | 3 | # GET / 4 | 5 | + Response 200 (application/json) 6 | + Attributes (array[Unknown]) 7 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/render/issue-566.apib: -------------------------------------------------------------------------------- 1 | # GET / 2 | 3 | + Response 200 (application/json) 4 | + Attributes 5 | + direction: north, east, south, west (array[string, array], fixed-type) 6 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/render/mixin-array-sample.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # GET / 3 | 4 | + Response 200 (application/json) 5 | + Attributes (array) 6 | + x 7 | + Include RefSample 8 | + y 9 | 10 | # Data Structures 11 | 12 | ## RefSample (array) 13 | 14 | description 15 | 16 | ### Sample 17 | - a 18 | - b 19 | 20 | ### Sample 21 | - d 22 | - e 23 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/render/mixin-object-sample.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # GET / 3 | 4 | + Response 200 (application/json) 5 | + Attributes 6 | - i1: *sample* 7 | - Include RefSample 8 | - i2 9 | 10 | # Data Structures 11 | 12 | ## RefSample 13 | - r1: *v1* 14 | - r2: v2 (sample) 15 | - r3: v3 (default) 16 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/render/mixin-override.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # GET / 3 | 4 | + Response 200 (application/json) 5 | 6 | + Attributes (object) 7 | + tasks (array, optional) 8 | + (Task) 9 | + name: `one` (string, required) 10 | + (Task) 11 | + Include Status 12 | + name: `two` (string, required) 13 | 14 | # Data Structures 15 | 16 | ## Status 17 | + status (enum[string]) 18 | + `CREATED` 19 | + `QUEUED` 20 | + `RUNNING` 21 | + `FINISHED` 22 | + `ERROR` 23 | 24 | ## Task (object) 25 | + Include Status 26 | + name (string, required) - Name of task 27 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/render/nested-object.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # GET / 3 | + Response 200 (application/json) 4 | + Attributes 5 | + user: pksunkara 6 | + social 7 | + github: pksunkara 8 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/render/nullable-samples.apib: -------------------------------------------------------------------------------- 1 | # GET / 2 | 3 | + Response 200 (application/json) 4 | + Attributes 5 | + bar: a (nullable, sample) 6 | + barbar: 42 (number, nullable, sample) 7 | + arab: true (boolean, nullable, sample) 8 | + ba (array, nullable) 9 | + Sample 10 | + rbo 11 | + ra 12 | + bara (object, nullable) 13 | + Sample 14 | + raba: rab 15 | + bara: b 16 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/render/nullable.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # GET / 3 | + Response 200 (application/json) 4 | + Attributes 5 | + s1: abc 6 | + s2: def (required) 7 | + s3 (optional) 8 | + s4 (nullable) 9 | + s5 (required, nullable) 10 | + s6 (optional, nullable) 11 | + s7: xyz (required, nullable) 12 | + s8: xyz (optional, nullable) 13 | 14 | 15 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/render/object-array-string.apib: -------------------------------------------------------------------------------- 1 | FORMAT: 1A 2 | 3 | # Example 4 | 5 | # Group Example 6 | # GET / 7 | + Response 200 (application/json) 8 | + Attributes (object) 9 | + a (array[string]) 10 | + b 11 | + c 12 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/render/object-mixin.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # GET / 3 | + Response 200 (application/json) 4 | + Attributes 5 | + area: Karlin 6 | + Include Address 7 | 8 | # Data Structures 9 | 10 | ## Address 11 | + city: Prague 12 | + zip: 34567 (number) 13 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/render/object-ref-object.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # GET / 3 | + Response 200 (application/json) 4 | + Attributes 5 | + p (Address) 6 | 7 | # Data Structures 8 | 9 | ## Address 10 | + city: Prague 11 | + zip: 34567 (number) 12 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/render/object-samples.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # GET / 3 | 4 | + Response 200 (application/json) 5 | + Attributes 6 | - o1 7 | - p1 8 | - p2 9 | 10 | - Sample 11 | - p1: x 12 | - p2: y 13 | 14 | - Sample 15 | - p1: 1 16 | - p2: 2 17 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/render/object-without-sample.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # GET / 3 | + Response 200 (application/json) 4 | + Attributes 5 | + address 6 | + street 7 | + name 8 | + house number (number) 9 | + city 10 | + zip: 34567 11 | + hobby: inlining, swimming, run 12 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/render/override.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # GET / 3 | + Response 200 (application/json) 4 | + Attributes (User) 5 | + a2: 1 6 | 7 | # Data Structures 8 | ## User 9 | + a1: 1 10 | + a2: 2 11 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/render/primitive-samples.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # GET / 3 | 4 | + Response 200 (application/json) 5 | + Attributes 6 | + s1: default (default) 7 | + s2: *sample* 8 | + s3 9 | - sample: v1 10 | - sample: v2 11 | - default: d1 12 | + n1: 5 (number, sample) 13 | + n2 (number) 14 | - sample: 8 15 | - default: 7 16 | + b1: true (boolean, sample) 17 | 18 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/render/simple-array.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # GET / 3 | + Response 200 (application/json) 4 | + Attributes (array) 5 | + pksunkara 6 | + 12 (number) 7 | + false (boolean) 8 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/render/simple-object.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # GET / 3 | + Response 200 (application/json) 4 | + Attributes 5 | + user: pksunkara 6 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/schema/array-fixed-inline-samples.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # Resource [/example] 3 | 4 | ## Action [GET] 5 | 6 | + Response 200 (application/json) 7 | 8 | + Attributes 9 | - address: *street*, city, *state* (array, fixed) 10 | 11 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/schema/array-fixed-inline.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # Resource [/example] 3 | 4 | ## Action [GET] 5 | 6 | + Response 200 (application/json) 7 | 8 | + Attributes 9 | - address: street, city, state (array, fixed) 10 | 11 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/schema/array-fixed-samples-complex.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # Resource [/example] 3 | 4 | ## Action [GET] 5 | 6 | + Response 200 (application/json) 7 | 8 | + Attributes 9 | - tags (array, fixed) 10 | - hello (string) 11 | - *42* (number) 12 | - (object) 13 | - name: *snow* (string) 14 | - color: white 15 | - description (string) 16 | - world 17 | 18 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/schema/array-fixed-samples.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # Resource [/example] 3 | 4 | ## Action [GET] 5 | 6 | + Response 200 (application/json) 7 | 8 | + Attributes 9 | - tags (array, fixed) 10 | - *hello* (string) 11 | - *42* (number) 12 | 13 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/schema/array-fixed-type-attributes.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | ## GET / 3 | 4 | + Response 200 (application/json) 5 | + Attributes (array, fixed-type) 6 | + (object) 7 | - msg: hello (string, required) 8 | - id: 42 (number) 9 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/schema/array-fixed-type-object.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | ## Test [/Test] 3 | 4 | + Attributes (object) 5 | 6 | + id: 12 (number) 7 | + name: Films you must watch (string, required) - List description 8 | + medias (array[Media], fixed-type) - References to the medias in the list 9 | 10 | # GET / 11 | + Response 200 (application/json) 12 | + Attributes (Test) 13 | 14 | 15 | # Data Structures 16 | 17 | ## Media(object) 18 | - mediaId: 25 (number, required) 19 | - name: Some name (string, required) 20 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/schema/array-fixed-type.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # Resource [/example] 3 | 4 | ## Action [GET] 5 | 6 | + Response 200 (application/json) 7 | 8 | + Attributes 9 | - tags (array, fixed-type) 10 | - hello (string) 11 | - 42 (number) 12 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/schema/array-fixed-types-only.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # Resource [/example] 3 | 4 | ## Action [GET] 5 | 6 | + Response 200 (application/json) 7 | 8 | + Attributes 9 | - tags (array, fixed) 10 | - (string) 11 | - (number) 12 | 13 | 14 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/schema/array-fixed.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # Resource [/example] 3 | 4 | ## Action [GET] 5 | 6 | + Response 200 (application/json) 7 | 8 | + Attributes 9 | - tags (array, fixed) 10 | - hello (string) 11 | - 42 (number) 12 | 13 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/schema/array-inline.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # Resource [/example] 3 | 4 | ## Action [GET] 5 | 6 | 7 | + Response 200 (application/json) 8 | 9 | + Attributes 10 | - address: street, city, state (array) 11 | 12 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/schema/array-of-arrays.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # Resource [/example] 3 | 4 | ## Action [GET] 5 | 6 | 7 | + Response 200 (application/json) 8 | 9 | + Attributes 10 | - tags (array) 11 | - 1, 2, 3, 4 (array[number]) 12 | 13 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/schema/array-of-types-mixed-complex.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # Resource [/example] 3 | 4 | ## Action [GET] 5 | 6 | + Response 200 (application/json) 7 | 8 | + Attributes 9 | - tags (array) 10 | - (object) 11 | - name: snow (string) 12 | - description (string) 13 | - 42 (number) 14 | 15 | 16 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/schema/array-of-types-mixed.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # Resource [/example] 3 | 4 | ## Action [GET] 5 | 6 | 7 | + Response 200 (application/json) 8 | 9 | + Attributes 10 | - tags (array) 11 | - hello (string) 12 | - 42 (number) 13 | 14 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/schema/array-of-types-only.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # Resource [/example] 3 | 4 | ## Action [GET] 5 | 6 | 7 | + Response 200 (application/json) 8 | 9 | + Attributes 10 | - tags (array) 11 | - (string) 12 | - (number) 13 | 14 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/schema/array-of-types.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # Resource [/example] 3 | 4 | ## Action [GET] 5 | 6 | 7 | + Response 200 (application/json) 8 | 9 | + Attributes 10 | - tags (array) 11 | - hello (string) 12 | - world (string) 13 | 14 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/schema/array-restricted-to-type.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # Resource [/example] 3 | 4 | ## Action [GET] 5 | 6 | + Response 200 (application/json) 7 | 8 | + Attributes 9 | - tags (array) 10 | - *5* (number, fixed) 11 | 12 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/schema/array-restricted-to-types-complex.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # Resource [/example] 3 | 4 | ## Action [GET] 5 | 6 | + Response 200 (application/json) 7 | 8 | + Attributes 9 | - tags (array) 10 | - *hello* (string, fixed) 11 | - 42 (number, fixed) 12 | 13 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/schema/array-restricted-to-types.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # Resource [/example] 3 | 4 | ## Action [GET] 5 | 6 | + Response 200 (application/json) 7 | 8 | + Attributes 9 | - tags (array) 10 | - (string, fixed) 11 | - (number, fixed) 12 | 13 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/schema/array-simple.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # Resource [/example] 3 | 4 | ## Action [GET] 5 | 6 | + Response 200 (application/json) 7 | 8 | + Attributes 9 | - address (array) 10 | - street 11 | - city 12 | - state 13 | 14 | 15 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/schema/array-with-nested-type.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # Resource [/example] 3 | 4 | ## Action [GET] 5 | 6 | 7 | + Response 200 (application/json) 8 | 9 | + Attributes 10 | - address (array[number]) 11 | - 4 12 | - 2 13 | - 42 14 | 15 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/schema/array-with-nested-types.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # Resource [/example] 3 | 4 | ## Action [GET] 5 | 6 | + Response 200 (application/json) 7 | 8 | + Attributes 9 | - address (array[number, string]) 10 | - 4 11 | - 2 12 | - hello 13 | - 42 14 | 15 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/schema/boolean-literal.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # Resource [/example] 3 | 4 | ## Action [GET] 5 | 6 | + Response 200 (application/json) 7 | 8 | + Attributes 9 | - street (array[boolean], fixed) 10 | - true 11 | - false 12 | 13 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/schema/boolean.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # Resource [/example] 3 | 4 | ## Action [GET] 5 | 6 | + Response 200 (application/json) 7 | 8 | + Attributes 9 | - street (boolean) 10 | 11 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/schema/default-attribute.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # Resource [/example] 3 | 4 | ## Action [GET] 5 | 6 | + Response 200 (application/json) 7 | 8 | + Attributes 9 | - list: 4 (enum, default) 10 | - 3 11 | - 4 12 | 13 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/schema/default-sample.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # Resource [/example] 3 | 4 | ## Action [GET] 5 | 6 | 7 | + Response 200 (application/json) 8 | 9 | + Attributes 10 | - list: 3, 2, 1 (array) 11 | - Default: 4 12 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/schema/default-section.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # Resource [/example] 3 | 4 | ## Action [GET] 5 | 6 | + Response 200 (application/json) 7 | 8 | + Attributes 9 | - list: 3, 4 (enum) 10 | - Default: 4 11 | 12 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/schema/description.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # Resource [/example] 3 | 4 | ## Action [GET] 5 | 6 | + Response 200 (application/json) 7 | 8 | + Attributes 9 | - id: 1 (number, required) - The unique identifier for a product 10 | - name: A green door (string, required) - Name of the product 11 | - price: 12.50 (number, required) 12 | - tags (array) 13 | 14 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. 15 | 16 | Sed sed lacus a arcu vehicula ultricies sed vel nibh. Mauris id cursus felis. 17 | 18 | Interdum et malesuada fames ac ante ipsum primis in faucibus. 19 | 20 | - unus 21 | - duo 22 | - tres 23 | - quattuor 24 | 25 | - Items 26 | - home 27 | - green 28 | 29 | 30 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/schema/enum-containing-enum.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # Resource [/example] 3 | 4 | ## Action [GET] 5 | 6 | + Response 200 (application/json) 7 | 8 | + Attributes 9 | - enum (enum) 10 | - 1, 2, 3, 4 (enum[number]) 11 | - something (string) 12 | - anything (string) 13 | 14 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/schema/enum-containing-object.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # Resource [/example] 3 | 4 | ## Action [GET] 5 | 6 | + Response 200 (application/json) 7 | 8 | + Attributes 9 | - tag (enum) 10 | - green (string) 11 | - (object) 12 | - tag_id: 1 13 | - label: green 14 | 15 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/schema/enum-containing-sample.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # Resource [/example] 3 | 4 | ## Action [GET] 5 | 6 | + Response 200 (application/json) 7 | 8 | + Attributes 9 | - tag (enum) 10 | - green (string) 11 | - *5* (number) 12 | 13 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/schema/enum-nullable.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # Resource [/example] 3 | 4 | ## Action [GET] 5 | 6 | + Response 200 (application/json) 7 | 8 | + Attributes 9 | + address (enum[number], nullable) 10 | + 4 11 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/schema/enum-of-strings.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # Resource [/example] 3 | 4 | ## Action [GET] 5 | 6 | + Response 200 (application/json) 7 | 8 | + Attributes 9 | - gender (enum) 10 | - male 11 | - female 12 | 13 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/schema/enum-with-type.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # Resource [/example] 3 | 4 | ## Action [GET] 5 | 6 | + Response 200 (application/json) 7 | 8 | + Attributes 9 | - address (enum[number]) 10 | - 4 11 | - 2 12 | - 42 13 | 14 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/schema/escaping.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # Resource [/example] 3 | 4 | ## Action [GET] 5 | 6 | + Response 200 (application/json) 7 | 8 | + Attributes 9 | - listing (object) 10 | 11 | Our real estate listing has different properties available. 12 | 13 | - `Properties` 14 | - This one. 15 | - That one. 16 | 17 | - Properties 18 | - description (string) 19 | - date_listed (string) 20 | - `some:location`: local (string) 21 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/schema/issue-493-multiple-same-required.apib: -------------------------------------------------------------------------------- 1 | # Data Structures 2 | 3 | ## Struct (object) 4 | + field (required) 5 | + field (required) 6 | 7 | # Group Example 8 | # test [GET /] 9 | 10 | + Response 200 (application/json) 11 | + Attributes (object) 12 | + data (required, array[Struct], fixed-type) 13 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/schema/issue-664.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | ## GET / 3 | 4 | + Response 200 (application/json) 5 | + Attributes (array, fixed-type) 6 | + (object) 7 | + msg: 'hello' (string) 8 | + id: 2 (number) 9 | + (object) 10 | + id: 3 (number) 11 | + msg: 'bye' (string) 12 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/schema/issue-686.apib: -------------------------------------------------------------------------------- 1 | # GET / 2 | 3 | + Response 200 (application/json) 4 | + Attributes 5 | + result (object, fixed) 6 | + obj_member (object) 7 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/schema/mixin-simple.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # Resource [/example] 3 | 4 | ## Action [GET] 5 | 6 | + Response 200 (application/json) 7 | 8 | + Attributes (Notification Token Full) 9 | 10 | 11 | # Data Structures 12 | 13 | ## Notification Token Create (object) 14 | - device_type: `ios` (string) - The platform. Should be `ios` or `gcm`. 15 | - token: `a-push-token` (string) - The token given by the platform. 16 | - links (object, optional) 17 | - user: 123 (string) 18 | 19 | ## Notification Token Full (object) 20 | - id: `122` (string) 21 | - Include Notification Token Create 22 | 23 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/schema/number-literal.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # Resource [/example] 3 | 4 | ## Action [GET] 5 | 6 | 7 | + Response 200 (application/json) 8 | 9 | + Attributes 10 | - street (array[number], fixed) 11 | - 0 12 | - 1.5 13 | - 340 14 | 15 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/schema/number.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # Resource [/example] 3 | 4 | ## Action [GET] 5 | 6 | + Response 200 (application/json) 7 | 8 | + Attributes 9 | - street (number) 10 | 11 | 12 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/schema/object-complex.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # Resource [/example] 3 | 4 | ## Action [GET] 5 | 6 | + Response 200 (application/json) 7 | 8 | + Attributes 9 | - id: 1 (required) 10 | - name: A green door 11 | - price: 12.50 (number) 12 | - tags: home, green 13 | - vector (array, optional) 14 | - 1 15 | - 2 16 | - 3 17 | - available: false (boolean) 18 | 19 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/schema/object-fixed-optional.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # Resource [/example] 3 | 4 | ## Action [GET] 5 | 6 | + Response 200 (application/json) 7 | 8 | + Attributes 9 | - person (object, fixed) 10 | - first_name 11 | - last_name (optional) 12 | 13 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/schema/object-fixed-type-named-type.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # Resource [/example] 3 | 4 | ## Action [GET] 5 | 6 | + Response 200 (application/json) 7 | + Attributes 8 | - person (Person) 9 | 10 | # Data Structures 11 | 12 | # Person (object, fixed-type) 13 | - first_name 14 | - last_name 15 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/schema/object-fixed-type-values.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # Resource [/example] 3 | 4 | ## Action [GET] 5 | 6 | + Response 200 (application/json) 7 | 8 | + Attributes 9 | - person (object, fixed-type) 10 | - first_name: Andrew 11 | - last_name: Smith 12 | 13 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/schema/object-fixed-type.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # Resource [/example] 3 | 4 | ## Action [GET] 5 | 6 | + Response 200 (application/json) 7 | 8 | + Attributes 9 | - person (object, fixed-type) 10 | - first_name 11 | - last_name 12 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/schema/object-fixed-values.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # Resource [/example] 3 | 4 | ## Action [GET] 5 | 6 | + Response 200 (application/json) 7 | 8 | + Attributes 9 | - person (object, fixed) 10 | - first_name: Andrew 11 | - last_name: Smith 12 | 13 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/schema/object-fixed.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # Resource [/example] 3 | 4 | ## Action [GET] 5 | 6 | + Response 200 (application/json) 7 | 8 | + Attributes 9 | - person (object, fixed) 10 | - first_name 11 | - last_name 12 | 13 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/schema/object-override.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # Resource [/example] 3 | 4 | ## Action [GET] 5 | 6 | + Response 200 (application/json) 7 | + Attributes (Person) 8 | + name: Kyle - Final Description 9 | + other: 1 (number) 10 | 11 | ## Data Structures 12 | ### Person 13 | + name: Katie - Original Description 14 | + other: `string-value` (string) 15 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/schema/object-simple.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # Resource [/example] 3 | 4 | ## Action [GET] 5 | 6 | + Response 200 (application/json) 7 | 8 | + Attributes 9 | - address 10 | - street 11 | - city (string) 12 | - state (string, required) 13 | 14 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/schema/object-very-complex.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # Resource [/example] 3 | 4 | ## Action [GET] 5 | 6 | + Response 200 (application/json) 7 | 8 | + Attributes 9 | - id: 1 (required) 10 | - name: A green door 11 | - price: 12.50 (number, optional) 12 | - tags: home, green 13 | - vector (array) 14 | - 1 15 | - 2 16 | - 3 17 | - address (object) 18 | - street (required) 19 | - number (number, required) 20 | - zip_code (required) 21 | - state 22 | - name 23 | - code 24 | - country (enum, required) 25 | - Czech Republic 26 | - United States of America 27 | 28 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/schema/one-of-complex.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # Resource [/example] 3 | 4 | ## Action [GET] 5 | 6 | + Response 200 (application/json) 7 | 8 | + Attributes 9 | - name 10 | - One Of 11 | - city 12 | - town 13 | - One Of 14 | - state 15 | - One Of 16 | - province 17 | - territory 18 | - country 19 | 20 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/schema/one-of-properties.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # Resource [/example] 3 | 4 | ## Action [GET] 5 | 6 | + Response 200 (application/json) 7 | 8 | + Attributes 9 | - person (object) 10 | - One Of 11 | - Properties 12 | - first_name 13 | - last_name 14 | - full_name 15 | 16 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/schema/one-of.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # Resource [/example] 3 | 4 | ## Action [GET] 5 | 6 | 7 | + Response 200 (application/json) 8 | 9 | + Attributes 10 | - city 11 | - One Of 12 | - state 13 | - province 14 | - country 15 | 16 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/schema/optional.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # Resource [/example] 3 | 4 | ## Action [GET] 5 | 6 | + Response 200 (application/json) 7 | 8 | + Attributes 9 | - street (optional) 10 | 11 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/schema/required-array.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # Resource [/example] 3 | 4 | ## Action [GET] 5 | 6 | + Response 200 (application/json) 7 | 8 | + Attributes 9 | - digits (array[number], required) 10 | 11 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/schema/required-object.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # Resource [/example] 3 | 4 | ## Action [GET] 5 | 6 | + Response 200 (application/json) 7 | 8 | + Attributes 9 | - items (object, required) 10 | - count: 1 11 | 12 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/schema/required.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # Resource [/example] 3 | 4 | ## Action [GET] 5 | 6 | 7 | + Response 200 (application/json) 8 | 9 | + Attributes 10 | - street (required) 11 | 12 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/schema/sample-complex.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # Resource [/example] 3 | 4 | ## Action [GET] 5 | 6 | + Response 200 (application/json) 7 | 8 | + Attributes 9 | - colors (array) 10 | - Sample: red 11 | - Sample 12 | - blue 13 | - green 14 | 15 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/schema/sample-fixed.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # Resource [/example] 3 | 4 | ## Action [GET] 5 | 6 | + Response 200 (application/json) 7 | + Attributes 8 | + fixedSample (fixed) 9 | + Sample 10 | Fixed Value 11 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/schema/sample-inline-attribute.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # Resource [/example] 3 | 4 | ## Action [GET] 5 | 6 | + Response 200 (application/json) 7 | 8 | + Attributes 9 | - list: 3, 4 (enum, sample) 10 | 11 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/schema/sample-inline-variable.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # Resource [/example] 3 | 4 | ## Action [GET] 5 | 6 | + Response 200 (application/json) 7 | 8 | + Attributes 9 | - list: *3, 4* (enum) 10 | 11 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/schema/sample.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # Resource [/example] 3 | 4 | ## Action [GET] 5 | 6 | + Response 200 (application/json) 7 | 8 | + Attributes 9 | - list (enum) 10 | - Sample 11 | - 3 12 | - 4 13 | 14 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/schema/string-literal.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # Resource [/example] 3 | 4 | ## Action [GET] 5 | 6 | + Response 200 (application/json) 7 | 8 | + Attributes 9 | - street (array[string], fixed) 10 | - bye bye 11 | - san francisco 12 | 13 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/schema/string.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # Resource [/example] 3 | 4 | ## Action [GET] 5 | 6 | 7 | + Response 200 (application/json) 8 | 9 | + Attributes 10 | - street (string) 11 | 12 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/schema/variable-property-fixed-type.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # GET / 3 | 4 | + Response 200 (application/json) 5 | + Attributes 6 | + *y* (array, fixed-type) 7 | + (object) 8 | + name (required) 9 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/schema/variable-property-fixed-type2.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # GET / 3 | 4 | + Response 200 (application/json) 5 | + Attributes 6 | + *y* (array, fixed-type) 7 | + (object) 8 | + name (required) 9 | + test 10 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/schema/variable-property.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # Resource [/example] 3 | 4 | ## Action [GET] 5 | 6 | + Response 200 (application/json) 7 | 8 | + Attributes 9 | - _links 10 | - *self* 11 | - href: a URI 12 | 13 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/schema/variable-property2.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | # Resource [/example] 3 | 4 | ## Action [GET] 5 | 6 | + Response 200 (application/json) 7 | 8 | + Attributes 9 | - item 10 | - *link* 11 | - href: a URI 12 | - id 13 | - name 14 | - email 15 | 16 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/syntax/issue-350.apib: -------------------------------------------------------------------------------- 1 | # Group Users 2 | ## Users [/users] 3 | ### View a User [GET {username}] 4 | 5 | + Parameters 6 | + username: kyle (string) 7 | 8 | + Response 204 9 | 10 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/syntax/issue-755.apib: -------------------------------------------------------------------------------- 1 | # GET / 2 | 3 | + Response 200 (application/json) 4 | 5 | [ 6 | info: 7 | description: | 8 | --- 9 | # Description 10 | 11 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/syntax/mixed-inheritance-and-mixin.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | ## GET / 3 | 4 | + Response 200 (application/json) 5 | + Attributes 6 | + c (C) 7 | 8 | # Data Structures 9 | 10 | ## A (object) 11 | 12 | ## B (object) 13 | 14 | ## C (A) 15 | - Include B 16 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/syntax/undisclosed-listitem.apib: -------------------------------------------------------------------------------- 1 | # Group Example 2 | ## / GET 3 | 4 | + Attributes 5 | + 6 | -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/utf-8/utf8_sequence_0-0xff_assigned_including-unprintable-asis_unseparated.txt: -------------------------------------------------------------------------------- 1 |  2 |  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/utf-8/utf8_sequence_0-0xff_assigned_including-unprintable-asis_unseparated.txt.json: -------------------------------------------------------------------------------- 1 | "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ" -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/utf-8/utf8_sequence_0-0xff_assigned_including-unprintable-asis_unseparated.txt.yaml: -------------------------------------------------------------------------------- 1 | "\0\x01\x02\x03\x04\x05\x06\a\b\t\n\v\f\r\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\e\x1C\x1D\x1E\x1F !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x7F\x80\x81\x82\x83\x84\N\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\_¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ" -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/utf-8/utf8_sequence_0-0xff_assigned_including-unprintable-replaced_unseparated.txt: -------------------------------------------------------------------------------- 1 | ��������� 2 | ������������������ !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~������…�������������������������� ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/utf-8/utf8_sequence_0-0xff_assigned_including-unprintable-replaced_unseparated.txt.json: -------------------------------------------------------------------------------- 1 | "���������\t\n\u000b\f\r������������������ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~������…�������������������������� ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ" -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/utf-8/utf8_sequence_0-0xff_assigned_including-unprintable-replaced_unseparated.txt.yaml: -------------------------------------------------------------------------------- 1 | "���������\t\n\v\f\r������������������ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~������\N��������������������������\_¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ" -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/utf-8/utf8_sequence_0-0xff_assigned_printable_unseparated.txt: -------------------------------------------------------------------------------- 1 | 2 | !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~… ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/utf-8/utf8_sequence_0-0xff_assigned_printable_unseparated.txt.json: -------------------------------------------------------------------------------- 1 | "\t\n\u000b\f\r !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~… ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ" -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/utf-8/utf8_sequence_0-0xff_assigned_printable_unseparated.txt.yaml: -------------------------------------------------------------------------------- 1 | "\t\n\v\f\r !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\N\_¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ" -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/utf-8/utf8_sequence_0-0xff_including-unassigned_including-unprintable-asis_unseparated.txt: -------------------------------------------------------------------------------- 1 |  2 |  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/utf-8/utf8_sequence_0-0xff_including-unassigned_including-unprintable-asis_unseparated.txt.json: -------------------------------------------------------------------------------- 1 | "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ" -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/utf-8/utf8_sequence_0-0xff_including-unassigned_including-unprintable-asis_unseparated.txt.yaml: -------------------------------------------------------------------------------- 1 | "\0\x01\x02\x03\x04\x05\x06\a\b\t\n\v\f\r\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\e\x1C\x1D\x1E\x1F !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x7F\x80\x81\x82\x83\x84\N\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\_¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ" -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/utf-8/utf8_sequence_0-0xff_including-unassigned_including-unprintable-replaced_unseparated.txt: -------------------------------------------------------------------------------- 1 | ��������� 2 | ������������������ !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~������…�������������������������� ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/utf-8/utf8_sequence_0-0xff_including-unassigned_including-unprintable-replaced_unseparated.txt.json: -------------------------------------------------------------------------------- 1 | "���������\t\n\u000b\f\r������������������ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~������…�������������������������� ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ" -------------------------------------------------------------------------------- /packages/drafter/test/fixtures/utf-8/utf8_sequence_0-0xff_including-unassigned_including-unprintable-replaced_unseparated.txt.yaml: -------------------------------------------------------------------------------- 1 | "���������\t\n\v\f\r������������������ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~������\N��������������������������\_¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ" -------------------------------------------------------------------------------- /packages/drafter/test/refract/dsd/test-Null.cc: -------------------------------------------------------------------------------- 1 | // 2 | // test/refract/dsd/test-Null.cc 3 | // test-librefract 4 | // 5 | // Created by Thomas Jandecka on 27/08/2017 6 | // Copyright (c) 2017 Apiary Inc. All rights reserved. 7 | // 8 | 9 | #include 10 | 11 | #include "refract/dsd/Null.h" 12 | 13 | using namespace refract; 14 | using namespace dsd; 15 | 16 | TEST_CASE("`Null`'s default element name is `null`", "[Element][Null]") 17 | { 18 | REQUIRE(std::string(Null::name) == "null"); 19 | } 20 | -------------------------------------------------------------------------------- /packages/drafter/test/test-CircularReferenceTest.cc: -------------------------------------------------------------------------------- 1 | 2 | #include "draftertest.h" 3 | 4 | using namespace draftertest; 5 | 6 | TEST_REFRACT("circular", "simple"); 7 | TEST_REFRACT("circular", "array"); 8 | TEST_REFRACT("circular", "cross"); 9 | TEST_REFRACT("circular", "embed"); 10 | TEST_REFRACT("circular", "enum"); 11 | TEST_REFRACT("circular", "array-in-object"); 12 | 13 | TEST_REFRACT("circular", "mixin-identity"); 14 | TEST_REFRACT("circular", "mixin-member"); 15 | TEST_REFRACT("circular", "mixin-embed"); 16 | TEST_REFRACT("circular", "mixin-cross"); 17 | TEST_REFRACT("circular", "mixed"); 18 | -------------------------------------------------------------------------------- /packages/drafter/test/test-ElementDataTest.cc: -------------------------------------------------------------------------------- 1 | #include "ElementData.h" 2 | 3 | using namespace refract; 4 | using namespace drafter; 5 | 6 | static_assert(is_primitive(), ""); 7 | static_assert(is_primitive(), ""); 8 | static_assert(is_primitive(), ""); 9 | 10 | static_assert(!is_primitive(), ""); 11 | static_assert(!is_primitive(), ""); 12 | static_assert(!is_primitive(), ""); 13 | static_assert(!is_primitive(), ""); 14 | static_assert(!is_primitive(), ""); 15 | static_assert(!is_primitive(), ""); 16 | static_assert(!is_primitive(), ""); 17 | static_assert(!is_primitive(), ""); 18 | static_assert(!is_primitive(), ""); 19 | -------------------------------------------------------------------------------- /packages/drafter/test/test-ExtendElementTest.cc: -------------------------------------------------------------------------------- 1 | #include "draftertest.h" 2 | 3 | using namespace draftertest; 4 | 5 | TEST_REFRACT("extend", "complex"); 6 | TEST_REFRACT("extend", "many"); 7 | TEST_REFRACT("extend", "circular"); 8 | -------------------------------------------------------------------------------- /packages/drafter/test/test-OneOfTest.cc: -------------------------------------------------------------------------------- 1 | 2 | #include "draftertest.h" 3 | 4 | using namespace draftertest; 5 | 6 | TEST_REFRACT("oneof", "simple"); 7 | TEST_REFRACT("oneof", "object"); 8 | TEST_REFRACT("oneof", "multi-properties"); 9 | TEST_REFRACT("oneof", "expanded"); 10 | TEST_REFRACT("oneof", "required"); 11 | TEST_REFRACT("oneof", "required2"); 12 | 13 | // FIXME: invalid JSON Schema 14 | TEST_REFRACT("oneof", "multi-oneof"); 15 | -------------------------------------------------------------------------------- /packages/drafter/test/test-RefractParseResultTest.cc: -------------------------------------------------------------------------------- 1 | // 2 | // test-RefractParseResultTest.cc 3 | // drafter 4 | // 5 | // Created by Pavan Kumar Sunkara on 26/09/15. 6 | // Copyright (c) 2015 Apiary. All rights reserved. 7 | // 8 | 9 | #include "draftertest.h" 10 | 11 | using namespace draftertest; 12 | 13 | TEST_REFRACT("parse-result", "simple"); 14 | TEST_REFRACT("parse-result", "warning"); 15 | TEST_REFRACT("parse-result", "warnings"); 16 | TEST_REFRACT("parse-result", "error"); 17 | TEST_REFRACT("parse-result", "error-warning"); 18 | TEST_REFRACT("parse-result", "blueprint"); 19 | TEST_REFRACT("parse-result", "mson"); 20 | 21 | TEST_REFRACT("mson", "type-attributes"); 22 | TEST_REFRACT("mson", "type-attributes-payload"); -------------------------------------------------------------------------------- /packages/drafter/test/test-SyntaxIssuesTest.cc: -------------------------------------------------------------------------------- 1 | // 2 | // test-SyntaxIssuesTest.cc 3 | // drafter 4 | // 5 | // Created by Jiří Kratochvíl on 19-09-2016. 6 | // Copyright (c) 2016 Apiary. All rights reserved. 7 | // 8 | 9 | #include "draftertest.h" 10 | 11 | using namespace draftertest; 12 | 13 | TEST_REFRACT("syntax", "issue-350"); 14 | TEST_REFRACT("syntax", "undisclosed-listitem"); 15 | TEST_REFRACT("syntax", "mixed-inheritance-and-mixin"); 16 | TEST_REFRACT("syntax", "issue-755"); 17 | -------------------------------------------------------------------------------- /packages/drafter/test/test-drafter.cc: -------------------------------------------------------------------------------- 1 | // 2 | // test-drafter.cc 3 | // drafter 4 | // 5 | // Created by Pavan Kumar Sunkara on 17/6/15. 6 | // Copyright (c) 2015 Apiary Inc. All rights reserved. 7 | // 8 | 9 | #define CATCH_CONFIG_MAIN 10 | #include "draftertest.h" 11 | -------------------------------------------------------------------------------- /tools/clang-format-check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | function report_error () { 6 | echo "There are some style issues. Please run clang-format on your files." 7 | exit 1; 8 | } 9 | 10 | clang-format -style=file -output-replacements-xml $(git ls-files | grep -e '\.cc$\|\.h$' | grep -v 'ext/boost') | awk '/\ 3 | 4 | Google Inc. 5 | Bloomberg Finance L.P. 6 | Yandex LLC 7 | 8 | Steven Knight 9 | Ryan Norton 10 | David J. Sankel 11 | Eric N. Vander Weele 12 | Tom Freudenberg 13 | -------------------------------------------------------------------------------- /tools/gyp/DEPS: -------------------------------------------------------------------------------- 1 | # DEPS file for gclient use in buildbot execution of gyp tests. 2 | # 3 | # (You don't need to use gclient for normal GYP development work.) 4 | 5 | vars = { 6 | "chromium_git": "https://chromium.googlesource.com/", 7 | } 8 | 9 | deps = { 10 | } 11 | 12 | deps_os = { 13 | "win": { 14 | "third_party/cygwin": 15 | Var("chromium_git") + "chromium/deps/cygwin@4fbd5b9", 16 | 17 | "third_party/python_26": 18 | Var("chromium_git") + "chromium/deps/python_26@5bb4080", 19 | 20 | "src/third_party/pefile": 21 | Var("chromium_git") + "external/pefile@72c6ae4", 22 | }, 23 | } 24 | -------------------------------------------------------------------------------- /tools/gyp/OWNERS: -------------------------------------------------------------------------------- 1 | * 2 | -------------------------------------------------------------------------------- /tools/gyp/README.md: -------------------------------------------------------------------------------- 1 | GYP can Generate Your Projects. 2 | =================================== 3 | 4 | Documents are available at [gyp.gsrc.io](https://gyp.gsrc.io), or you can check out ```md-pages``` branch to read those documents offline. 5 | -------------------------------------------------------------------------------- /tools/gyp/buildbot/commit_queue/OWNERS: -------------------------------------------------------------------------------- 1 | set noparent 2 | bradnelson@chromium.org 3 | bradnelson@google.com 4 | iannucci@chromium.org 5 | scottmg@chromium.org 6 | thakis@chromium.org 7 | -------------------------------------------------------------------------------- /tools/gyp/buildbot/commit_queue/README: -------------------------------------------------------------------------------- 1 | cq_config.json describes the trybots that must pass in order 2 | to land a change through the commit queue. 3 | Comments are here as the file is strictly JSON. 4 | -------------------------------------------------------------------------------- /tools/gyp/buildbot/commit_queue/cq_config.json: -------------------------------------------------------------------------------- 1 | { 2 | "trybots": { 3 | "launched": { 4 | "tryserver.nacl": { 5 | "gyp-presubmit": ["defaulttests"], 6 | "gyp-linux": ["defaulttests"], 7 | "gyp-mac": ["defaulttests"], 8 | "gyp-win32": ["defaulttests"], 9 | "gyp-win64": ["defaulttests"] 10 | } 11 | }, 12 | "triggered": { 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /tools/gyp/codereview.settings: -------------------------------------------------------------------------------- 1 | # This file is used by gcl to get repository specific information. 2 | CODE_REVIEW_SERVER: codereview.chromium.org 3 | CC_LIST: gyp-developer@googlegroups.com 4 | VIEW_VC: https://chromium.googlesource.com/external/gyp/+/ 5 | TRY_ON_UPLOAD: False 6 | TRYSERVER_PROJECT: gyp 7 | TRYSERVER_PATCHLEVEL: 1 8 | TRYSERVER_ROOT: gyp 9 | TRYSERVER_SVN_URL: svn://svn.chromium.org/chrome-try/try-nacl 10 | PROJECT: gyp 11 | -------------------------------------------------------------------------------- /tools/gyp/data/win/large-pdb-shim.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | // This file is used to generate an empty .pdb -- with a 4KB pagesize -- that is 6 | // then used during the final link for modules that have large PDBs. Otherwise, 7 | // the linker will generate a pdb with a page size of 1KB, which imposes a limit 8 | // of 1GB on the .pdb. By generating an initial empty .pdb with the compiler 9 | // (rather than the linker), this limit is avoided. With this in place PDBs may 10 | // grow to 2GB. 11 | // 12 | // This file is referenced by the msvs_large_pdb mechanism in MSVSUtil.py. 13 | -------------------------------------------------------------------------------- /tools/gyp/gyp: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Copyright 2013 The Chromium Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | 6 | set -e 7 | base=$(dirname "$0") 8 | exec python "${base}/gyp_main.py" "$@" 9 | -------------------------------------------------------------------------------- /tools/gyp/gyp.bat: -------------------------------------------------------------------------------- 1 | @rem Copyright (c) 2009 Google Inc. All rights reserved. 2 | @rem Use of this source code is governed by a BSD-style license that can be 3 | @rem found in the LICENSE file. 4 | 5 | @python "%~dp0gyp_main.py" %* 6 | -------------------------------------------------------------------------------- /tools/gyp/gyp_main.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | # Copyright (c) 2009 Google Inc. All rights reserved. 4 | # Use of this source code is governed by a BSD-style license that can be 5 | # found in the LICENSE file. 6 | 7 | import os 8 | import sys 9 | 10 | # Make sure we're using the version of pylib in this repo, not one installed 11 | # elsewhere on the system. 12 | sys.path.insert(0, os.path.join(os.path.dirname(sys.argv[0]), 'pylib')) 13 | import gyp 14 | 15 | if __name__ == '__main__': 16 | sys.exit(gyp.script_main()) 17 | -------------------------------------------------------------------------------- /tools/gyp/pylib/gyp/generator/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apiaryio/drafter/8d77123fff15b606e08d6608cdea856530e550a2/tools/gyp/pylib/gyp/generator/__init__.py -------------------------------------------------------------------------------- /tools/gyp/pylib/gyp/generator/xcode_test.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | # Copyright (c) 2013 Google Inc. All rights reserved. 4 | # Use of this source code is governed by a BSD-style license that can be 5 | # found in the LICENSE file. 6 | 7 | """ Unit tests for the xcode.py file. """ 8 | 9 | import gyp.generator.xcode as xcode 10 | import unittest 11 | import sys 12 | 13 | 14 | class TestEscapeXcodeDefine(unittest.TestCase): 15 | if sys.platform == 'darwin': 16 | def test_InheritedRemainsUnescaped(self): 17 | self.assertEqual(xcode.EscapeXcodeDefine('$(inherited)'), '$(inherited)') 18 | 19 | def test_Escaping(self): 20 | self.assertEqual(xcode.EscapeXcodeDefine('a b"c\\'), 'a\\ b\\"c\\\\') 21 | 22 | if __name__ == '__main__': 23 | unittest.main() 24 | -------------------------------------------------------------------------------- /tools/gyp/samples/samples.bat: -------------------------------------------------------------------------------- 1 | @rem Copyright (c) 2009 Google Inc. All rights reserved. 2 | @rem Use of this source code is governed by a BSD-style license that can be 3 | @rem found in the LICENSE file. 4 | 5 | @python %~dp0/samples %* 6 | -------------------------------------------------------------------------------- /tools/gyp/setup.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | # Copyright (c) 2009 Google Inc. All rights reserved. 4 | # Use of this source code is governed by a BSD-style license that can be 5 | # found in the LICENSE file. 6 | 7 | from setuptools import setup 8 | 9 | setup( 10 | name='gyp', 11 | version='0.1', 12 | description='Generate Your Projects', 13 | author='Chromium Authors', 14 | author_email='chromium-dev@googlegroups.com', 15 | url='http://code.google.com/p/gyp', 16 | package_dir = {'': 'pylib'}, 17 | packages=['gyp', 'gyp.generator'], 18 | entry_points = {'console_scripts': ['gyp=gyp:script_main'] } 19 | ) 20 | -------------------------------------------------------------------------------- /tools/gyp/tools/README: -------------------------------------------------------------------------------- 1 | pretty_vcproj: 2 | Usage: pretty_vcproj.py "c:\path\to\vcproj.vcproj" [key1=value1] [key2=value2] 3 | 4 | They key/value pair are used to resolve vsprops name. 5 | 6 | For example, if I want to diff the base.vcproj project: 7 | 8 | pretty_vcproj.py z:\dev\src-chrome\src\base\build\base.vcproj "$(SolutionDir)=z:\dev\src-chrome\src\chrome\\" "$(CHROMIUM_BUILD)=" "$(CHROME_BUILD_TYPE)=" > orignal.txt 9 | pretty_vcproj.py z:\dev\src-chrome\src\base\base_gyp.vcproj "$(SolutionDir)=z:\dev\src-chrome\src\chrome\\" "$(CHROMIUM_BUILD)=" "$(CHROME_BUILD_TYPE)=" > gyp.txt 10 | 11 | And you can use your favorite diff tool to see the changes. 12 | 13 | Note: In the case of base.vcproj, the original vcproj is one level up the generated one. 14 | I suggest you do a search and replace for '"..\' and replace it with '"' in original.txt 15 | before you perform the diff. -------------------------------------------------------------------------------- /tools/gyp/tools/Xcode/README: -------------------------------------------------------------------------------- 1 | Specifications contains syntax formatters for Xcode 3. These do not appear to be supported yet on Xcode 4. To use these with Xcode 3 please install both the gyp.pbfilespec and gyp.xclangspec files in 2 | 3 | ~/Library/Application Support/Developer/Shared/Xcode/Specifications/ 4 | 5 | and restart Xcode. -------------------------------------------------------------------------------- /tools/gyp/tools/Xcode/Specifications/gyp.pbfilespec: -------------------------------------------------------------------------------- 1 | /* 2 | gyp.pbfilespec 3 | GYP source file spec for Xcode 3 4 | 5 | There is not much documentation available regarding the format 6 | of .pbfilespec files. As a starting point, see for instance the 7 | outdated documentation at: 8 | http://maxao.free.fr/xcode-plugin-interface/specifications.html 9 | and the files in: 10 | /Developer/Library/PrivateFrameworks/XcodeEdit.framework/Versions/A/Resources/ 11 | 12 | Place this file in directory: 13 | ~/Library/Application Support/Developer/Shared/Xcode/Specifications/ 14 | */ 15 | 16 | ( 17 | { 18 | Identifier = sourcecode.gyp; 19 | BasedOn = sourcecode; 20 | Name = "GYP Files"; 21 | Extensions = ("gyp", "gypi"); 22 | MIMETypes = ("text/gyp"); 23 | Language = "xcode.lang.gyp"; 24 | IsTextFile = YES; 25 | IsSourceFile = YES; 26 | } 27 | ) 28 | -------------------------------------------------------------------------------- /tools/gyp/tools/emacs/README: -------------------------------------------------------------------------------- 1 | How to install gyp-mode for emacs: 2 | 3 | Add the following to your ~/.emacs (replace ... with the path to your gyp 4 | checkout). 5 | 6 | (setq load-path (cons ".../tools/emacs" load-path)) 7 | (require 'gyp) 8 | 9 | Restart emacs (or eval-region the added lines) and you should be all set. 10 | 11 | Please note that ert is required for running the tests, which is included in 12 | Emacs 24, or available separately from https://github.com/ohler/ert 13 | -------------------------------------------------------------------------------- /tools/gyp/tools/emacs/run-unit-tests.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Copyright (c) 2012 Google Inc. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | emacs --no-site-file --no-init-file --batch \ 6 | --load ert.el --load gyp.el --load gyp-tests.el \ 7 | -f ert-run-tests-batch-and-exit 8 | -------------------------------------------------------------------------------- /tools/make-tarball.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ "x$1" = "xcheckout" ] ; then 4 | # Recursively checkout a repository to destination 5 | # Usage: tools/make-tarball.sh checkout DESTINATION 6 | 7 | git checkout-index --all --prefix=$2 8 | git submodule foreach --quiet "$0 checkout $2"'$path/' 9 | 10 | exit 0 11 | fi 12 | 13 | TMPDIR=`mktemp -d` 14 | trap 'rm -rf $TMPDIR' EXIT 15 | VERSION=$1 16 | 17 | if [ "x$VERSION" = "x" ] ; then 18 | echo "Usage: $0 VERSION" 19 | exit 1 20 | fi 21 | 22 | DIR=drafter-$VERSION 23 | TARBALL=$(pwd)/drafter-$VERSION.tar.gz 24 | 25 | echo "Exporting to $TMPDIR/$DIR" 26 | 27 | $(pwd)/tools/make-tarball.sh checkout $TMPDIR/$DIR/ 28 | 29 | ( 30 | # Remove unnessecery files 31 | cd $TMPDIR/$DIR 32 | rm -fr appveyor.yml .circleci .clang-format ARCHITECTURE.md .git* Dockerfile Gemfile* *.gyp *.gypi vcbuild.bat tools *.xcodeproj *.xcworkspace 33 | ) 34 | 35 | ( 36 | cd $TMPDIR 37 | echo "Creating tarball $TARBALL" 38 | env GZIP=-9 tar -czf $TARBALL $DIR 39 | ) 40 | -------------------------------------------------------------------------------- /tools/release.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | OS=`uname -s | tr '[:upper:]' '[:lower:]'` 4 | TAG=`git describe --tags $CIRCLE_SHA1` 5 | 6 | # Download GitHub releases script 7 | curl -L -O https://github.com/aktau/github-release/releases/download/v0.6.2/$OS-amd64-github-release.tar.bz2 8 | tar -xjf $OS-amd64-github-release.tar.bz2 9 | GITHUB_RELEASE=./bin/$OS/amd64/github-release 10 | 11 | # Create GitHub release 12 | $GITHUB_RELEASE release -u apiaryio -r drafter --tag $TAG 13 | 14 | # Create and upload tarball 15 | TARBALL=drafter-$TAG.tar.gz 16 | ./tools/make-tarball.sh $TAG 17 | $GITHUB_RELEASE upload -u apiaryio -r drafter --tag $TAG --name $TARBALL --file $TARBALL 18 | -------------------------------------------------------------------------------- /tools/third-party-licenses-check.sh: -------------------------------------------------------------------------------- 1 | #/usr/bin/env bash 2 | 3 | set -e 4 | 5 | print_changed_message() { 6 | echo "Committed THIRD_PARTY_LICENSES.txt is inconsistent with license files." 7 | echo "Please run './tools/make-third-party-licenses.sh' and commit 'THIRD_PARTY_LICENSES.txt'." 8 | exit 1 9 | } 10 | 11 | ./tools/make-third-party-licenses.sh 12 | git diff --quiet -- THIRD_PARTY_LICENSES.txt || print_changed_message 13 | --------------------------------------------------------------------------------