Polishing

- Pass attributes into RequestPartFieldsSnippet
 - Add missing package.info.java for new asciidoctor package
This commit is contained in:
Andy Wilkinson
2016-10-25 16:10:49 +01:00
parent 8035b91735
commit 60211dab86
2 changed files with 24 additions and 4 deletions

View File

@@ -0,0 +1,20 @@
/*
* Copyright 2014-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Spring REST Docs Asciidoctor extensions.
*/
package org.springframework.restdocs.asciidoctor;

View File

@@ -381,7 +381,7 @@ public abstract class PayloadDocumentation {
*/
public static RequestPartFieldsSnippet requestPartFields(String part,
Map<String, Object> attributes, FieldDescriptor... descriptors) {
return requestPartFields(part, Arrays.asList(descriptors));
return requestPartFields(part, attributes, Arrays.asList(descriptors));
}
/**
@@ -409,7 +409,7 @@ public abstract class PayloadDocumentation {
*/
public static RequestPartFieldsSnippet requestPartFields(String part,
Map<String, Object> attributes, List<FieldDescriptor> descriptors) {
return new RequestPartFieldsSnippet(part, descriptors);
return new RequestPartFieldsSnippet(part, descriptors, attributes);
}
/**
@@ -429,7 +429,7 @@ public abstract class PayloadDocumentation {
*/
public static RequestPartFieldsSnippet relaxedRequestPartFields(String part,
Map<String, Object> attributes, FieldDescriptor... descriptors) {
return relaxedRequestPartFields(part, Arrays.asList(descriptors));
return relaxedRequestPartFields(part, attributes, Arrays.asList(descriptors));
}
/**
@@ -449,7 +449,7 @@ public abstract class PayloadDocumentation {
*/
public static RequestPartFieldsSnippet relaxedRequestPartFields(String part,
Map<String, Object> attributes, List<FieldDescriptor> descriptors) {
return new RequestPartFieldsSnippet(part, descriptors, true);
return new RequestPartFieldsSnippet(part, descriptors, attributes, true);
}
/**