Previously, if a field was marked as optional and it appeared in a
payload with a null value a failure would occur if the field's type
was configured to be a JsonFieldType other than NULL.
This commit relaxes this restriction so that a null value is tolerated
when a field has been marked as optional.
Closes gh-365
It appears that Asciidoctor uses \n on all platforms but when the
expected content is read in on Windows it uses \r\n as the line
endings are being changed when Git performs the clone.
- Copy snippets used in the tests in @BeforeClass rather than using
Gradle so that the tests can be run easily in an IDE
- Address problems in operation_block_macro.rb reported by Rubocop
- Rename new test class to more closely match the name of the Ruby
class that it’s testing
- Gracefully handle a missing operation
- Align behaviour when an operation or snippet is missing more closely
with Asciidoctor’s behaviour when an include references a missing
file
- Use kebab-case rather than snake_case for new test resources
- Update the documentation to describe the new macro
See gh-354
Closes gh-323
By default, Travis uses a rather old version of Oracle's JDK 8 in
its container-based infrastructure. It would appear that this is what
has been causing the build to fail with minimal diagnostics.
This commit implements a suggestion [1] to get a more recent version
of Java 8 by installing the oracle-java8-installer package via the APT
addon.
[1] https://github.com/travis-ci/travis-ci/issues/3259#issuecomment-130860338
This commit upgrade to Spring Framework 4.3.6.RELEASE. A side-effect
of this change is that the Content-Type header is now always the first
header when building a request with MockMvc. One test has been updated
to reflect this change in ordering.
Closes gh-342
Previously, when a field was documented it would implicitly document
the whole subsection of the payload identified by that field. This
could lead to users inadvertently failing to document part of the
payload. Arguably, this was a bug as it violated REST Docs' principle
of producing accurate, detail documentation. However, fixing it
requires a breaking change as people may also be relying on this
behaviour. A balance needed to be struck so the fix is being made in
a minor release.
This commit introduces a new subsectionWithPath method which returns a
SubsectionDescriptor; a specialisation of FieldDescriptor. Users
that were intentionally relying on the old behaviour will have to
replace some usage of fieldWithPath with subsectionWithPath instead.
Users who were unintentionally relying on the old behaviour will have
to add some additional descriptors produced using fieldWithPath and
will receive more accurate documentation in return.
Closes gh-274