Commit Graph

249 Commits

Author SHA1 Message Date
Andy Wilkinson
e37d0ff560 Use Maven Central rather than JCenter 2016-05-05 11:35:07 +01:00
Andy Wilkinson
96330b2e30 Improve testing of optional links and request and response fields 2016-05-05 10:05:20 +01:00
Andy Wilkinson
a3e6883524 Apply Eclipse Mars (4.5.2) code formatting 2016-05-05 09:50:01 +01:00
Andy Wilkinson
032b7b59dc Fix HalLinkExtractor's extraction of link hrefs
Closes gh-220
2016-04-13 14:09:08 +01:00
Andy Wilkinson
547c4f3fb1 Simplify documentation of Asciidoctor Maven plugin's phase
Previously the phase was documented as `package` by default with
instructions to change it to `prepare-package` if you want to
include the documentation in the project's package. This led to some
confusion and sometimes the step to change it to `prepare-package`
was missed.

This commit updates the documentation to recommend that
`prepare-package` is always used. It works equally well for both
cases (packaging the documentation or not) and avoids the possible
confusion described above.

Closes gh-218
2016-04-04 11:39:56 +01:00
Andy Wilkinson
36bacb470b Move to the offical SonarQube plugin 2016-02-16 11:11:53 +00:00
Andy Wilkinson
40201e2e99 Improve handling of empty parameters in curl and HTTP request snippets
Previously, both the curl and HTTP request snippets would ignore
a parameter with no value, for example from the query string of the
url http://localhost:8080/foo?bar.

This commit updates both snippets so that such parameters are
included in the generated snippet, including a multi-part request
that is uploading form data and a field in the form has no value.
Additions have been made to the tests for both snippets.

While the request parameters snippet correctly handled parameters with
no value, there was no test verifying that this was the case. One
has been added in this commit.

Closes gh-200
2016-02-15 15:41:09 +00:00
Andy Wilkinson
4d44401efa Add a note in the documentation about use of the JVM's default charset
Closes gh-201
2016-02-15 12:43:32 +00:00
Andy Wilkinson
cfc413f7ed Avoid byte[] to String to byte[] conversion when pretty printing
Previously, PrettyPrintingContentModifier would convert the byte[]
content into a String and then back into a byte[]. It did so without
consideration for the content’s character set. As a result, it could
fail to preserve the correct character encoding.

This commit updates PrettyPrintingContentModifier to avoid converting
the content into a String and back into a byte[] and to work entirely
with byte arrays instead. Removing the intermediate String from the
process removes the possibility of the content becoming corrupted.

Closes gh-202
2016-02-15 12:28:07 +00:00
Andy Wilkinson
74f9e272fd Apply Eclipse Mars' code formatting 2016-02-15 12:15:40 +00:00
Andy Wilkinson
811e7adf70 Add missing package-info.java for config package 2016-02-08 11:49:04 +00:00
Andy Wilkinson
29675728aa Introduce a code of conduct 2016-02-02 09:45:37 +00:00
Andy Wilkinson
068e59608d Merge pull request #186 from Martin Hock
* gh-186:
  Fix String comparison in HttpRequestSnippet
2016-01-29 13:55:10 +00:00
mnhock
5dbb31f38a Fix String comparison in HttpRequestSnippet
Closes gh-186
2016-01-29 13:54:16 +00:00
Andy Wilkinson
9dfa0b5385 Polish PatternReplacingContentModifier 2016-01-29 11:15:45 +00:00
Andy Wilkinson
2b21e8e766 Merge pull request #188 from Grant Hutchins
* gh-188:
  Fix typo
2016-01-27 17:19:12 +00:00
Grant Hutchins
d55b5b7738 Fix typo
Closes gh-188
2016-01-27 17:18:57 +00:00
Andy Wilkinson
97ae7a9ce9 Fix javadoc problem with use of em dash 2016-01-26 12:51:37 +00:00
Andy Wilkinson
d184425216 Polishing 2016-01-26 12:38:34 +00:00
Andy Wilkinson
02fa42445f Make consistent use of the diamond operator with generic types 2016-01-26 11:14:29 +00:00
Andy Wilkinson
08b24e0496 Remove redundant Eclipse metadata 2016-01-19 13:36:20 +00:00
Andy Wilkinson
82a5b96b69 Update the default copyright header for 2016 2016-01-19 13:28:19 +00:00
Andy Wilkinson
194e62bde3 Remove assumption that working directory will be the project’s root
The plugin for building the samples assumed that the current working
directory would be the directory containing the project’s build.gradle.
While this is generally true on the command line (it isn’t if
-project-dir is used), it isn’t true in Gradle’s IDE integration. This
was leading to an NPE as the sampleBuild task was being configured
to depend on a null task as a result of not finding the sample’s pom.xml
or build.grade file.

This commit corrects the main build.gradle to configure each sample’s
working directory relative to the root project’s directory, rather
than relying on the working directory. It also improves
SampleBuildConfigurer so that it will throw an exception if it fails to
find a sample’s build.gradle or pom.xml rather than continuing
and triggering an NPE inside Gradle.

Closes gh-185
2016-01-17 20:25:21 +00:00
Andy Wilkinson
99a2e4f0e0 Update the samples to build against 1.0.2 snapshots 2015-12-10 09:55:36 +00:00
Spring Buildmaster
83e56f68ab Next development version 2015-12-10 01:43:58 -08:00
Andy Wilkinson
437d2bcbce Uniquely identify the 1.0.x branch in Sonar 2015-12-09 21:15:44 +00:00
Andy Wilkinson
f6f4b77331 Upgrade the samples to use the latest Asciidoctor plugins 2015-12-09 10:52:19 +00:00
Andy Wilkinson
939769db11 Upgrade the samples to Spring Boot 1.2.7.RELEASE 2015-12-09 10:50:20 +00:00
Andy Wilkinson
88d3e72ae9 Upgrade to Spring Framework 4.1.8.RELEASE 2015-12-09 10:48:56 +00:00
Johnny Lim
a3c3bef093 Fix the link in the documentation to the default snippet templates
Closes gh-160
2015-12-03 17:54:43 +00:00
Andy Wilkinson
e8cf957f15 Update documentation to mention that you can write custom preprocessors
Closes gh-156
2015-12-03 17:50:34 +00:00
Andy Wilkinson
7a819b15b6 Make it clear that JSON array responses can be documented
Closes gh-163
2015-12-03 17:39:00 +00:00
Andy Wilkinson
c559efb81b Provide examples for JUnit rule configuration with both Maven and Gradle
Closes gh-162
2015-12-03 16:02:16 +00:00
Andy Wilkinson
310639a4cc Merge branch 'gh-167' into 1.0.x 2015-11-16 17:48:51 +00:00
Andy Wilkinson
acb87b98b8 Improve testing of XML attribute handling
Closes gh-166
2015-11-16 17:47:07 +00:00
cschaetzlein
58b992d99e Allow individual attributes in an XML element to be documented
Documenting an XML attribute in the XML payload leads to a
NullPointerException since no parent nodes exists for an XML
attribute. Rather than always trying to remove a node from its parent,
this commit changes the logic to apply special treament to nodes that
are attributes and remove the attribute from its owning element
instead.

Closes gh-167
2015-11-16 17:46:22 +00:00
Andy Wilkinson
75085477b6 Suppress unwanted output to System.err when pretty printing content
Previously, when the XML pretty printer attempted to pretty print
the content of a request or response it would output an error to
System.err if the content was not valid XML. While, benign, this
output was distracting.

This commit updates the XML pretty printer to suppress its output to
System.err by configuring it with an ErrorHandler and an ErrorListener
that swallow any errors of which they are notified.

Closes gh-153
2015-10-22 10:04:56 +01:00
Andy Wilkinson
9a3e4c5f70 Update the samples to build against 1.0.1 snapshots 2015-10-22 10:04:56 +01:00
Andy Wilkinson
69f6b40e28 Correct the links in the documentation to the samples on GitHub
Closes gh-147
2015-10-09 09:43:34 +01:00
Spring Buildmaster
260ffeebba Next development version 2015-10-07 05:48:20 -07:00
Andy Wilkinson
cfcc43c482 Ensure that generated poms contain <name> and <description> 2015-10-07 11:48:09 +01:00
Andy Wilkinson
6debc593e5 Don't apply to Spring IO Plugin to the docs project 2015-10-07 10:38:50 +01:00
Andy Wilkinson
0213c9e6fd Add the Spring IO plugin to the build 2015-10-07 09:47:21 +01:00
Andy Wilkinson
6443ed177e Fix building Maven sample on Windows 2015-10-06 17:48:30 +01:00
Andy Wilkinson
75e965c782 Correct the name of the mvnw script on Windows 2015-10-06 17:15:47 +01:00
Andy Wilkinson
9a362abe77 Update reference to mvnw.bat when building samples on Windows 2015-10-06 17:07:46 +01:00
Andy Wilkinson
f07f23ec85 Update versions of various dependencies 2015-10-06 16:49:07 +01:00
Andy Wilkinson
c97efcce2e Use the Maven Wrapper in the Spring Data REST-based sample
Closes gh-146
2015-10-06 16:41:34 +01:00
Andy Wilkinson
a693d12ce0 Polish the documentation 2015-10-06 16:29:23 +01:00
Andy Wilkinson
723b7a284f Use default location for .adoc source in Gradle-based sample
Previously both samples supported Maven and Gradle. Due to the different
default locations between the two build systems, the Gradle-based sample
was configured to use Maven’s default location for its .adoc files.

The samples have now been updated so that one sample uses Maven and the
other uses Gradle. However, when this change was made, the customization
of the Gradle-based sample’s .adoc file location wasn’t removed.

This commit updates the Gradle-based sample to use the default location,
src/docs/asciidoc, for its .adoc source files.

Closes gh-145
2015-10-05 10:22:55 +01:00