@@ -104,6 +104,7 @@ default List<ApiDoc> processApiData(ProjectDocConfigBuilder projectBuilder, Fram
104104 if (apiConfig .isSortByTitle ()) {
105105 // sort by title
106106 Collections .sort (apiDocList );
107+ return apiDocList ;
107108 } else if (setCustomOrder ) {
108109 ATOMIC_INTEGER .getAndAdd (maxOrder );
109110 // while set custom oder
@@ -114,6 +115,8 @@ default List<ApiDoc> processApiData(ProjectDocConfigBuilder projectBuilder, Fram
114115 }
115116 });
116117 return tempList .stream ().sorted (Comparator .comparing (ApiDoc ::getOrder )).collect (Collectors .toList ());
118+ } else {
119+ apiDocList .stream ().peek (p -> p .setOrder (ATOMIC_INTEGER .getAndAdd (1 ))).collect (Collectors .toList ());
117120 }
118121 return apiDocList ;
119122 }
@@ -398,6 +401,7 @@ default List<ApiMethodDoc> buildEntryPointMethod(
398401 int methodOrder = 0 ;
399402 for (DocJavaMethod docJavaMethod : docJavaMethods ) {
400403 JavaMethod method = docJavaMethod .getJavaMethod ();
404+
401405 // handle request mapping
402406 RequestMapping requestMapping = baseMappingHandler .handle (projectBuilder , baseUrl ,
403407 method , frameworkAnnotations ,
@@ -408,6 +412,7 @@ default List<ApiMethodDoc> buildEntryPointMethod(
408412 if (Objects .isNull (requestMapping .getShortUrl ())) {
409413 continue ;
410414 }
415+ docJavaMethod .setMethodType (requestMapping .getMethodType ());
411416 ApiMethodDoc apiMethodDoc = new ApiMethodDoc ();
412417 // fill contentType by annotation's consumes parameter
413418 String mediaType = requestMapping .getMediaType ();
@@ -604,7 +609,9 @@ default ApiMethodReqParam requestParams(final DocJavaMethod docJavaMethod, Proje
604609 boolean isRequestBody = false ;
605610 boolean required = false ;
606611 boolean isRequestParam = false ;
607- if (annotations .isEmpty ()) {
612+ if (annotations .isEmpty ()
613+ && (Methods .GET .getValue ().equals (docJavaMethod .getMethodType ())
614+ || Methods .DELETE .getValue ().equals (docJavaMethod .getMethodType ()))) {
608615 isRequestParam = true ;
609616 }
610617 for (JavaAnnotation annotation : annotations ) {
@@ -662,7 +669,7 @@ default ApiMethodReqParam requestParams(final DocJavaMethod docJavaMethod, Proje
662669 .setField (paramName )
663670 .setType (ParamTypeConstants .PARAM_TYPE_FILE )
664671 .setId (paramList .size () + 1 )
665- .setQueryParam (true )
672+ .setQueryParam (false )
666673 .setRequired (required )
667674 .setVersion (DocGlobalConstants .DEFAULT_VERSION )
668675 .setDesc (comment .toString ());
@@ -676,7 +683,10 @@ default ApiMethodReqParam requestParams(final DocJavaMethod docJavaMethod, Proje
676683 continue ;
677684 }
678685
679- boolean queryParam = !isRequestBody && !isPathVariable ;
686+ boolean queryParam = Methods .GET .getValue ().equals (docJavaMethod .getMethodType ()) &&
687+ Methods .DELETE .getValue ().equals (docJavaMethod .getMethodType ()) &&
688+ !isRequestBody &&
689+ !isPathVariable ;
680690 if (JavaClassValidateUtil .isCollection (fullyQualifiedName ) || JavaClassValidateUtil .isArray (fullyQualifiedName )) {
681691 String [] gicNameArr = DocClassUtil .getSimpleGicName (typeName );
682692 String gicName = gicNameArr [0 ];
@@ -730,7 +740,7 @@ default ApiMethodReqParam requestParams(final DocJavaMethod docJavaMethod, Proje
730740 .setField (paramName )
731741 .setType (ParamTypeConstants .PARAM_TYPE_FILE )
732742 .setId (paramList .size () + 1 )
733- .setQueryParam (true )
743+ .setQueryParam (false )
734744 .setRequired (required )
735745 .setVersion (DocGlobalConstants .DEFAULT_VERSION )
736746 .setHasItems (true )
@@ -828,7 +838,7 @@ else if (javaClass.isEnum()) {
828838 String .valueOf (required ), Boolean .FALSE , new HashMap <>(16 ), builder , groupClasses , 0 , Boolean .FALSE , null ));
829839 }
830840 }
831- return ApiParamTreeUtil .buildMethodReqParam (paramList , queryReqParamMap , pathReqParamMap , requestBodyCounter );
841+ return ApiParamTreeUtil .buildMethodReqParam (paramList , queryReqParamMap , pathReqParamMap , docJavaMethod . getMethodType () );
832842 }
833843
834844 default ApiRequestExample buildReqJson (DocJavaMethod javaMethod , ApiMethodDoc apiMethodDoc ,
0 commit comments