Skip to content

Commit 217f80e

Browse files
committed
Fixed a bug where generated classes were treated as APIs.
1 parent aaf34ef commit 217f80e

File tree

2 files changed

+67
-5
lines changed

2 files changed

+67
-5
lines changed

src/gen/java/org/computate/vertx/openapi/Swagger2GeneratorGen.java

Lines changed: 66 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,16 @@
5555
import io.vertx.core.json.JsonArray;
5656

5757
/**
58-
* <h1>Suggestions that can generate more code for you: </h1>
59-
* <ol>
58+
<ol>
59+
<li>You can add a class comment <b>"Api: true"</b> if you wish to GET, POST, PATCH or PUT these Swagger2Generator objects in a RESTful API.
60+
</li>
61+
0<h3>Suggestions that can generate more code for you: </h3></ol>
6062
* <li>You can add a class comment <b>"Api: true"</b> if you wish to GET, POST, PATCH or PUT these Swagger2Generator objects in a RESTful API.
6163
* </li>
62-
* </ol>
63-
* <h1>About the Swagger2Generator class and it's generated class Swagger2GeneratorGen&lt;Object&gt;: </h1>
64+
* 0<h3>Suggestions that can generate more code for you: </h3>
65+
* <h3>About the Swagger2Generator class and it's generated class Swagger2GeneratorGen&lt;Object&gt;: </h3>extends Swagger2GeneratorGen
6466
* <p>
65-
* This Java class extends a generated Java class built by the <a href="https://github.com/computate-org/computate">https://github.com/computate-org/computate</a> project.
67+
* This Java class extends a generated Java class Swagger2GeneratorGen built by the <a href="https://github.com/computate-org/computate">https://github.com/computate-org/computate</a> project.
6668
* Whenever this Java class is modified or touched, the watch service installed as described in the README, indexes all the information about this Java class in a local Apache Solr Search Engine.
6769
* If you are running the service, you can see the indexed data about this Java Class here:
6870
* </p>
@@ -71,6 +73,27 @@
7173
* The extended class ending with "Gen" did not exist at first, but was automatically created by the same watch service based on the data retrieved from the local Apache Server search engine.
7274
* The extended class contains many generated fields, getters, setters, initialization code, and helper methods to help build a website and API fast, reactive, and scalable.
7375
* </p>
76+
* extends Swagger2GeneratorGen<Object>
77+
* <p>This <code>class Swagger2Generator extends Swagger2GeneratorGen&lt;Object&gt;</code>, which means it extends a newly generated Swagger2GeneratorGen.
78+
* The generated <code>class Swagger2GeneratorGen extends Object</code> which means that Swagger2Generator extends Swagger2GeneratorGen which extends Object.
79+
* This generated inheritance is a powerful feature that allows a lot of boiler plate code to be created for you automatically while still preserving inheritance through the power of Java Generic classes.
80+
* </p>
81+
* Api: true
82+
* ApiTag.enUS: null
83+
* ApiUri.enUS: null
84+
* Color: null
85+
* IconGroup: null
86+
* IconName: null
87+
* Indexed: true
88+
* {@inheritDoc}
89+
* <p>By adding a class comment "{@inheritDoc}", the Swagger2Generator class will inherit the helpful inherited class comments from the super class Swagger2GeneratorGen.
90+
* </p>
91+
* Rows: null
92+
* Model: true
93+
* Page: true
94+
* SuperPage.enUS: null
95+
* Promise: true
96+
* AName: null
7497
* <p>
7598
* Delete the class Swagger2Generator in Solr:
7699
* curl 'http://localhost:8983/solr/computate/update?commitWithin=1000&overwrite=true&wt=json' -X POST -H 'Content-type: text/xml' --data-raw '&lt;add&gt;&lt;delete&gt;&lt;query&gt;classeNomCanonique_enUS_indexed_string:org.computate.vertx.openapi.Swagger2Generator&lt;/query&gt;&lt;/delete&gt;&lt;/add&gt;'
@@ -96,6 +119,7 @@ public abstract class Swagger2GeneratorGen<DEV> extends Object {
96119
// webClient //
97120
///////////////
98121

122+
99123
/** The entity webClient
100124
* is defined as null before being initialized.
101125
*/
@@ -134,6 +158,7 @@ protected Swagger2Generator webClientInit() {
134158
// siteRequest_ //
135159
//////////////////
136160

161+
137162
/** The entity siteRequest_
138163
* is defined as null before being initialized.
139164
*/
@@ -172,6 +197,7 @@ protected Swagger2Generator siteRequest_Init() {
172197
// config //
173198
////////////
174199

200+
175201
/** The entity config
176202
* is defined as null before being initialized.
177203
*/
@@ -229,6 +255,7 @@ public static String staticSearchFqConfig(ComputateSiteRequest siteRequest_, Str
229255
// appName //
230256
/////////////
231257

258+
232259
/** The entity appName
233260
* is defined as null before being initialized.
234261
*/
@@ -278,6 +305,7 @@ public static String staticSearchFqAppName(ComputateSiteRequest siteRequest_, St
278305
// languageName //
279306
//////////////////
280307

308+
281309
/** The entity languageName
282310
* is defined as null before being initialized.
283311
*/
@@ -327,6 +355,7 @@ public static String staticSearchFqLanguageName(ComputateSiteRequest siteRequest
327355
// appPath //
328356
/////////////
329357

358+
330359
/** The entity appPath
331360
* is defined as null before being initialized.
332361
*/
@@ -376,6 +405,7 @@ public static String staticSearchFqAppPath(ComputateSiteRequest siteRequest_, St
376405
// openApiVersion //
377406
////////////////////
378407

408+
379409
/** The entity openApiVersion
380410
* is defined as null before being initialized.
381411
*/
@@ -425,6 +455,7 @@ public static String staticSearchFqOpenApiVersion(ComputateSiteRequest siteReque
425455
// openApiVersionNumber //
426456
//////////////////////////
427457

458+
428459
/** The entity openApiVersionNumber
429460
* is defined as null before being initialized.
430461
*/
@@ -482,6 +513,7 @@ public static String staticSearchFqOpenApiVersionNumber(ComputateSiteRequest sit
482513
// tabsSchema //
483514
////////////////
484515

516+
485517
/** The entity tabsSchema
486518
* is defined as null before being initialized.
487519
*/
@@ -539,6 +571,7 @@ public static String staticSearchFqTabsSchema(ComputateSiteRequest siteRequest_,
539571
// apiVersion //
540572
////////////////
541573

574+
542575
/** The entity apiVersion
543576
* is defined as null before being initialized.
544577
*/
@@ -588,6 +621,7 @@ public static String staticSearchFqApiVersion(ComputateSiteRequest siteRequest_,
588621
// openApiYamlPath //
589622
/////////////////////
590623

624+
591625
/** The entity openApiYamlPath
592626
* is defined as null before being initialized.
593627
*/
@@ -637,6 +671,7 @@ public static String staticSearchFqOpenApiYamlPath(ComputateSiteRequest siteRequ
637671
// openApiYamlFile //
638672
/////////////////////
639673

674+
640675
/** The entity openApiYamlFile
641676
* is defined as null before being initialized.
642677
*/
@@ -675,6 +710,7 @@ protected Swagger2Generator openApiYamlFileInit() {
675710
// sqlCreatePath //
676711
///////////////////
677712

713+
678714
/** The entity sqlCreatePath
679715
* is defined as null before being initialized.
680716
*/
@@ -724,6 +760,7 @@ public static String staticSearchFqSqlCreatePath(ComputateSiteRequest siteReques
724760
// sqlCreateFile //
725761
///////////////////
726762

763+
727764
/** The entity sqlCreateFile
728765
* is defined as null before being initialized.
729766
*/
@@ -762,6 +799,7 @@ protected Swagger2Generator sqlCreateFileInit() {
762799
// sqlDropPath //
763800
/////////////////
764801

802+
765803
/** The entity sqlDropPath
766804
* is defined as null before being initialized.
767805
*/
@@ -811,6 +849,7 @@ public static String staticSearchFqSqlDropPath(ComputateSiteRequest siteRequest_
811849
// sqlDropFile //
812850
/////////////////
813851

852+
814853
/** The entity sqlDropFile
815854
* is defined as null before being initialized.
816855
*/
@@ -849,6 +888,7 @@ protected Swagger2Generator sqlDropFileInit() {
849888
// articleYamlPath //
850889
/////////////////////
851890

891+
852892
/** The entity articleYamlPath
853893
* is defined as null before being initialized.
854894
*/
@@ -898,6 +938,7 @@ public static String staticSearchFqArticleYamlPath(ComputateSiteRequest siteRequ
898938
// articleYamlFile //
899939
/////////////////////
900940

941+
901942
/** The entity articleYamlFile
902943
* is defined as null before being initialized.
903944
*/
@@ -936,6 +977,7 @@ protected Swagger2Generator articleYamlFileInit() {
936977
// w //
937978
///////
938979

980+
939981
/** The entity w
940982
* is defined as null before being initialized.
941983
*/
@@ -976,6 +1018,7 @@ protected Swagger2Generator wInit() {
9761018
// wSqlCreate //
9771019
////////////////
9781020

1021+
9791022
/** The entity wSqlCreate
9801023
* is defined as null before being initialized.
9811024
*/
@@ -1016,6 +1059,7 @@ protected Swagger2Generator wSqlCreateInit() {
10161059
// wSqlDrop //
10171060
//////////////
10181061

1062+
10191063
/** The entity wSqlDrop
10201064
* is defined as null before being initialized.
10211065
*/
@@ -1056,6 +1100,7 @@ protected Swagger2Generator wSqlDropInit() {
10561100
// wArticle //
10571101
//////////////
10581102

1103+
10591104
/** The entity wArticle
10601105
* is defined as null before being initialized.
10611106
*/
@@ -1096,6 +1141,7 @@ protected Swagger2Generator wArticleInit() {
10961141
// wPaths //
10971142
////////////
10981143

1144+
10991145
/** The entity wPaths
11001146
* is defined as null before being initialized.
11011147
*/
@@ -1136,6 +1182,7 @@ protected Swagger2Generator wPathsInit() {
11361182
// wRequestBodies //
11371183
////////////////////
11381184

1185+
11391186
/** The entity wRequestBodies
11401187
* is defined as null before being initialized.
11411188
*/
@@ -1176,6 +1223,7 @@ protected Swagger2Generator wRequestBodiesInit() {
11761223
// wSchemas //
11771224
//////////////
11781225

1226+
11791227
/** The entity wSchemas
11801228
* is defined as null before being initialized.
11811229
*/
@@ -1211,12 +1259,25 @@ protected Swagger2Generator wSchemasInit() {
12111259
wSchemas.initDeepForClass(siteRequest_);
12121260
return (Swagger2Generator)this;
12131261
}
1262+
1263+
12141264
public static final String writeApiError1 = "An error occured while writing the API. ";
12151265
public static final String writeApiError = writeApiError1;
12161266
public static final String writeApiError21 = "An error occured while writing the API. ";
12171267
public static final String writeApiError2 = writeApiError21;
12181268

12191269

1270+
1271+
1272+
1273+
1274+
1275+
1276+
1277+
1278+
1279+
1280+
12201281
//////////////
12211282
// initDeep //
12221283
//////////////

src/main/java/org/computate/vertx/openapi/Swagger2Generator.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,7 @@ public Future<Void> loadClasses() {
296296
searchClasses.rows(1000000);
297297
searchClasses.fq("siteChemin_indexed_string:" + SearchTool.escapeQueryChars(appPath));
298298
searchClasses.fq("classeApi_indexed_boolean:true");
299+
searchClasses.fq("classeEtendGen_indexed_boolean:true");
299300
searchClasses.fq("partEstClasse_indexed_boolean:true");
300301
searchClasses.sortAsc("classeNomCanonique_enUS_indexed_string");
301302
searchClasses.sortAsc("partNumero_indexed_int");

0 commit comments

Comments
 (0)