moon0326 / wp-openapi

19 stars 5 forks source link

openapi definition incompatible with swagger/openapi-generator #31

Closed dpalic closed 1 year ago

dpalic commented 1 year ago

if I export the openapi json I am expecting to be able to use the definition as input to swagger/openapi-generator

I am using the maven plugin

            <plugin>
               <groupId>org.openapitools</groupId>
               <artifactId>openapi-generator-maven-plugin</artifactId>
               <version>7.0.0</version>
               <executions>
                  <execution>
                     <goals>
                        <goal>generate</goal>
                     </goals>
                     <configuration>
                        <inputSpec>${openApiSpec}</inputSpec>
                        <generatorName>java</generatorName>
                        <library>resttemplate</library>
                        <apiPackage>com.dummy.api</apiPackage>
                        <modelPackage>com.dummy.api.model</modelPackage>
                        <useSpringBoot3>true</useSpringBoot3>
                        <generateApis>true</generateApis>
                        <generateApiDocumentation>false</generateApiDocumentation>
                        <generateApiTests>true</generateApiTests>
                        <generateModels>true</generateModels>
                        <generateModelDocumentation>true</generateModelDocumentation>
                        <generateModelTests>false</generateModelTests>
                        <generateSupportingFiles>true</generateSupportingFiles>
                        <legacyDiscriminatorBehavior>false</legacyDiscriminatorBehavior>
                        <configOptions>
                           <delegatePattern>true</delegatePattern>
                           <additionalModelTypeAnnotations>@lombok.Data</additionalModelTypeAnnotations>
                        </configOptions>
                     </configuration>
                  </execution>
               </executions>
            </plugin>

after running the generator I am facing this issue:

[WARNING] /src/test/resources/openapi.json [0:0]: unexpected error in Open-API generation
org.openapitools.codegen.SpecValidationException: There were issues with the specification. The option can be disabled via validateSpec (Maven/Gradle) or --skip-validate-spec (CLI).
 | Error count: 102, Warning count: 0
Errors: 
    -attribute paths.'/elementor/v1/notes'(post).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute .components.schemas.block-type.properties is not of type `object` (#/components/schemas/block-type)
    -attribute components.schemas.user.required is not of type `array`
    -attribute paths.'/yoast/v1/configuration/enable_tracking'(post).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute paths.'/elementor/v1/kit-elements-defaults/{type}'(post).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute .components.schemas.widget.required is not of type `array` (#/components/schemas/widget)
    -attribute paths.'/elementor/v1/favorites/{id}'(delete).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute paths.'/wp/v2/menus'(post).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute .components.schemas.theme.enum is not of type `array` (#/components/schemas/theme)
    -attribute paths.'/wp/v2/users/{user_id}/application-passwords'(post).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute paths.'/elementor/v1/kit-elements-defaults/{type}'(put).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute paths.'/elementor/v1/form-submissions/restore'(put).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute paths.'/wp/v2/users'(get).parameters.[has_published_posts].schemas.enum is not of type `array`
    -attribute paths.'/wp/v2/users'(post).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute paths.'/yoast/v1/wincher/authenticate'(post).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute paths.'/redirection/v1/group/{id}'(put).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute paths.'/elementor/v1/notes/{id}'(post).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute components.schemas.wp_template_part.required is not of type `array`
    -attribute components.schemas.cp_campaign.required is not of type `array`
    -attribute paths.'/elementor/v1/template-library/templates'(post).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute .components.schemas.tag.properties is not of type `object` (#/components/schemas/tag)
    -attribute paths.'/wp/v2/templates'(post).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute .components.schemas.category.properties is not of type `object` (#/components/schemas/category)
    -attribute .components.schemas.nav_menu.required is not of type `array` (#/components/schemas/nav_menu)
    -attribute paths.'/bsf-core/v1/license/activate'(post).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute paths.'/elementor/v1/form-submissions/{id}'(put).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute .components.schemas.cp_connections.required is not of type `array` (#/components/schemas/cp_connections)
    -attribute paths.'/elementor/v1/notes/{id}'(put).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute paths.'/elementor/v1/form-submissions'(delete).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute paths.'/redirection/v1/group'(patch).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute paths.'/elementor/v1/notes/read-status'(post).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute components.schemas.tag.required is not of type `array`
    -attribute .components.schemas.wp_template.required is not of type `array` (#/components/schemas/wp_template)
    -attribute paths.'/redirection/v1/group'(post).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute components.schemas.category.properties is not of type `object`
    -attribute paths.'/yoast/v1/new-content-type-visibility/dismiss-post-type'(post).requestBody.content.'application/x-www-form-urlencoded'.schema. is not of type `object`
    -attribute paths.'/elementor/v1/kit-elements-defaults/{type}'(patch).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute paths.'/redirection/v1/group/{id}'(post).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute paths.'/wpml/st/v1/settings'(post).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute .components.schemas.cp_campaign.required is not of type `array` (#/components/schemas/cp_campaign)
    -attribute paths.'/redirection/v1/group/{id}'(patch).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute paths.'/elementor/v1/favorites/{id}'(post).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute paths.'/elementor/v1/notes/{id}'(delete).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute components.schemas.application-password.required is not of type `array`
    -attribute components.schemas.cp_connections.properties is not of type `object`
    -attribute .components.schemas.rendered-block.required is not of type `array` (#/components/schemas/rendered-block)
    -attribute paths.'/yoast/v1/wincher/keyphrases'(post).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute components.schemas.rendered-block.required is not of type `array`
    -attribute paths.'/elementor/v1/form-submissions/{id}'(patch).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute paths.'/elementor/v1/form-submissions'(put).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute .components.schemas.category.required is not of type `array` (#/components/schemas/category)
    -attribute paths.'/wp/v2/cp_campaign'(post).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute paths.'/elementor/v1/form-submissions/restore'(patch).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute paths.'/yoast/v1/integrations/set_active'(post).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute components.schemas.cp_connections.required is not of type `array`
    -attribute paths.'/yoast/v1/configuration/save_configuration_state'(post).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute paths.'/elementor/v1/notes/{id}'(patch).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute paths.'/wp/v2/media/{id}/edit'(post).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute .components.schemas.wp_template_part.required is not of type `array` (#/components/schemas/wp_template_part)
    -attribute .components.schemas.application-password.required is not of type `array` (#/components/schemas/application-password)
    -attribute paths.'/yoast/v1/semrush/authenticate'(post).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute paths.'/wp/v2/media/{id}/post-process'(post).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute paths.'/wp/v2/users/me'(delete).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute components.schemas.block-type.properties is not of type `object`
    -attribute components.schemas.block-type.required is not of type `array`
    -attribute .components.schemas.nav_menu.properties is not of type `object` (#/components/schemas/nav_menu)
    -attribute components.schemas.tag.properties is not of type `object`
    -attribute components.schemas.nav_menu.properties is not of type `object`
    -attribute paths.'/elementor/v1/send-event'(post).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute components.schemas.theme.enum is not of type `array`
    -attribute paths.'/wp/v2/cp_connections'(post).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute components.schemas.wp_template.required is not of type `array`
    -attribute .components.schemas.cp_campaign.properties is not of type `object` (#/components/schemas/cp_campaign)
    -attribute components.schemas.comment.properties is not of type `object`
    -attribute paths.'/redirection/v1/group'(put).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute paths.'/elementor/v1/form-submissions/restore'(post).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute paths.'/wp/v2/plugins'(post).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute components.schemas.widget.required is not of type `array`
    -attribute .components.schemas.tag.required is not of type `array` (#/components/schemas/tag)
    -attribute paths.'/elementor/v1/notes/read-status'(delete).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute paths.'/elementor/v1/form-submissions'(post).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute components.schemas.category.required is not of type `array`
    -attribute components.schemas.cp_campaign.properties is not of type `object`
    -attribute paths.'/yoast/v1/wistia_embed_permission'(post).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute paths.'/elementor/v1/form-submissions/{id}'(post).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute .components.schemas.block-type.required is not of type `array` (#/components/schemas/block-type)
    -attribute .components.schemas.user.required is not of type `array` (#/components/schemas/user)
    -attribute .components.schemas.comment.properties is not of type `object` (#/components/schemas/comment)
    -attribute paths.'/wp/v2/tags'(post).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute paths.'/yoast/v1/alerts/dismiss'(post).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute paths.'/elementor/v1/form-submissions/{id}'(delete).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute paths.'/wp/v2/users/{id}'(delete).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute paths.'/yoast/v1/wincher/keyphrases/track'(post).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute paths.'/yoast/v1/new-content-type-visibility/dismiss-taxonomy'(post).requestBody.content.'application/x-www-form-urlencoded'.schema. is not of type `object`
    -attribute components.schemas.nav_menu.required is not of type `array`
    -attribute paths.'/wp/v2/widgets'(post).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute paths.'/elementor/v1/form-submissions'(patch).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute paths.'/yoast/v1/configuration/site_representation'(post).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute .components.schemas.cp_connections.properties is not of type `object` (#/components/schemas/cp_connections)
    -attribute paths.'/yoast/v1/semrush/country_code'(post).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute paths.'/wp/v2/template-parts'(post).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute paths.'/wp/v2/categories'(post).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`

    at org.openapitools.codegen.config.CodegenConfigurator.toContext (CodegenConfigurator.java:668)
    at org.openapitools.codegen.config.CodegenConfigurator.toClientOptInput (CodegenConfigurator.java:695)
    at org.openapitools.codegen.plugin.CodeGenMojo.execute (CodeGenMojo.java:884)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:972)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:568)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
[ERROR] 
org.openapitools.codegen.SpecValidationException: There were issues with the specification. The option can be disabled via validateSpec (Maven/Gradle) or --skip-validate-spec (CLI).
 | Error count: 102, Warning count: 0
Errors: 
    -attribute paths.'/elementor/v1/notes'(post).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute .components.schemas.block-type.properties is not of type `object` (#/components/schemas/block-type)
    -attribute components.schemas.user.required is not of type `array`
    -attribute paths.'/yoast/v1/configuration/enable_tracking'(post).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute paths.'/elementor/v1/kit-elements-defaults/{type}'(post).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute .components.schemas.widget.required is not of type `array` (#/components/schemas/widget)
    -attribute paths.'/elementor/v1/favorites/{id}'(delete).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute paths.'/wp/v2/menus'(post).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute .components.schemas.theme.enum is not of type `array` (#/components/schemas/theme)
    -attribute paths.'/wp/v2/users/{user_id}/application-passwords'(post).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute paths.'/elementor/v1/kit-elements-defaults/{type}'(put).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute paths.'/elementor/v1/form-submissions/restore'(put).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute paths.'/wp/v2/users'(get).parameters.[has_published_posts].schemas.enum is not of type `array`
    -attribute paths.'/wp/v2/users'(post).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute paths.'/yoast/v1/wincher/authenticate'(post).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute paths.'/redirection/v1/group/{id}'(put).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute paths.'/elementor/v1/notes/{id}'(post).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute components.schemas.wp_template_part.required is not of type `array`
    -attribute components.schemas.cp_campaign.required is not of type `array`
    -attribute paths.'/elementor/v1/template-library/templates'(post).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute .components.schemas.tag.properties is not of type `object` (#/components/schemas/tag)
    -attribute paths.'/wp/v2/templates'(post).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute .components.schemas.category.properties is not of type `object` (#/components/schemas/category)
    -attribute .components.schemas.nav_menu.required is not of type `array` (#/components/schemas/nav_menu)
    -attribute paths.'/bsf-core/v1/license/activate'(post).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute paths.'/elementor/v1/form-submissions/{id}'(put).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute .components.schemas.cp_connections.required is not of type `array` (#/components/schemas/cp_connections)
    -attribute paths.'/elementor/v1/notes/{id}'(put).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute paths.'/elementor/v1/form-submissions'(delete).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute paths.'/redirection/v1/group'(patch).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute paths.'/elementor/v1/notes/read-status'(post).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute components.schemas.tag.required is not of type `array`
    -attribute .components.schemas.wp_template.required is not of type `array` (#/components/schemas/wp_template)
    -attribute paths.'/redirection/v1/group'(post).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute components.schemas.category.properties is not of type `object`
    -attribute paths.'/yoast/v1/new-content-type-visibility/dismiss-post-type'(post).requestBody.content.'application/x-www-form-urlencoded'.schema. is not of type `object`
    -attribute paths.'/elementor/v1/kit-elements-defaults/{type}'(patch).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute paths.'/redirection/v1/group/{id}'(post).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute paths.'/wpml/st/v1/settings'(post).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute .components.schemas.cp_campaign.required is not of type `array` (#/components/schemas/cp_campaign)
    -attribute paths.'/redirection/v1/group/{id}'(patch).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute paths.'/elementor/v1/favorites/{id}'(post).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute paths.'/elementor/v1/notes/{id}'(delete).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute components.schemas.application-password.required is not of type `array`
    -attribute components.schemas.cp_connections.properties is not of type `object`
    -attribute .components.schemas.rendered-block.required is not of type `array` (#/components/schemas/rendered-block)
    -attribute paths.'/yoast/v1/wincher/keyphrases'(post).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute components.schemas.rendered-block.required is not of type `array`
    -attribute paths.'/elementor/v1/form-submissions/{id}'(patch).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute paths.'/elementor/v1/form-submissions'(put).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute .components.schemas.category.required is not of type `array` (#/components/schemas/category)
    -attribute paths.'/wp/v2/cp_campaign'(post).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute paths.'/elementor/v1/form-submissions/restore'(patch).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute paths.'/yoast/v1/integrations/set_active'(post).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute components.schemas.cp_connections.required is not of type `array`
    -attribute paths.'/yoast/v1/configuration/save_configuration_state'(post).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute paths.'/elementor/v1/notes/{id}'(patch).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute paths.'/wp/v2/media/{id}/edit'(post).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute .components.schemas.wp_template_part.required is not of type `array` (#/components/schemas/wp_template_part)
    -attribute .components.schemas.application-password.required is not of type `array` (#/components/schemas/application-password)
    -attribute paths.'/yoast/v1/semrush/authenticate'(post).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute paths.'/wp/v2/media/{id}/post-process'(post).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute paths.'/wp/v2/users/me'(delete).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute components.schemas.block-type.properties is not of type `object`
    -attribute components.schemas.block-type.required is not of type `array`
    -attribute .components.schemas.nav_menu.properties is not of type `object` (#/components/schemas/nav_menu)
    -attribute components.schemas.tag.properties is not of type `object`
    -attribute components.schemas.nav_menu.properties is not of type `object`
    -attribute paths.'/elementor/v1/send-event'(post).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute components.schemas.theme.enum is not of type `array`
    -attribute paths.'/wp/v2/cp_connections'(post).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute components.schemas.wp_template.required is not of type `array`
    -attribute .components.schemas.cp_campaign.properties is not of type `object` (#/components/schemas/cp_campaign)
    -attribute components.schemas.comment.properties is not of type `object`
    -attribute paths.'/redirection/v1/group'(put).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute paths.'/elementor/v1/form-submissions/restore'(post).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute paths.'/wp/v2/plugins'(post).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute components.schemas.widget.required is not of type `array`
    -attribute .components.schemas.tag.required is not of type `array` (#/components/schemas/tag)
    -attribute paths.'/elementor/v1/notes/read-status'(delete).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute paths.'/elementor/v1/form-submissions'(post).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute components.schemas.category.required is not of type `array`
    -attribute components.schemas.cp_campaign.properties is not of type `object`
    -attribute paths.'/yoast/v1/wistia_embed_permission'(post).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute paths.'/elementor/v1/form-submissions/{id}'(post).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute .components.schemas.block-type.required is not of type `array` (#/components/schemas/block-type)
    -attribute .components.schemas.user.required is not of type `array` (#/components/schemas/user)
    -attribute .components.schemas.comment.properties is not of type `object` (#/components/schemas/comment)
    -attribute paths.'/wp/v2/tags'(post).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute paths.'/yoast/v1/alerts/dismiss'(post).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute paths.'/elementor/v1/form-submissions/{id}'(delete).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute paths.'/wp/v2/users/{id}'(delete).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute paths.'/yoast/v1/wincher/keyphrases/track'(post).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute paths.'/yoast/v1/new-content-type-visibility/dismiss-taxonomy'(post).requestBody.content.'application/x-www-form-urlencoded'.schema. is not of type `object`
    -attribute components.schemas.nav_menu.required is not of type `array`
    -attribute paths.'/wp/v2/widgets'(post).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute paths.'/elementor/v1/form-submissions'(patch).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute paths.'/yoast/v1/configuration/site_representation'(post).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute .components.schemas.cp_connections.properties is not of type `object` (#/components/schemas/cp_connections)
    -attribute paths.'/yoast/v1/semrush/country_code'(post).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute paths.'/wp/v2/template-parts'(post).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`
    -attribute paths.'/wp/v2/categories'(post).requestBody.content.'application/x-www-form-urlencoded'.schema.required is not of type `array`

    at org.openapitools.codegen.config.CodegenConfigurator.toContext (CodegenConfigurator.java:668)
    at org.openapitools.codegen.config.CodegenConfigurator.toClientOptInput (CodegenConfigurator.java:695)
    at org.openapitools.codegen.plugin.CodeGenMojo.execute (CodeGenMojo.java:884)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:972)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:568)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
moon0326 commented 1 year ago

Thank you for the report. It looks like there is a validation issue withrequestBody.content. I'll look into it soon.

moon0326 commented 1 year ago

@dpalic Well, it turned out that openapi-generator-maven-plugin doesn't support OpenAPI 3.1.0, which WP OpenAPI uses.

See https://github.com/OpenAPITools/openapi-generator/issues/9083 for more details.

Unfortunately, WordPress already uses the latest JSON Schema that OpenAPI 3.1.0 uses.

moon0326 commented 1 year ago

closing it as won't be for now.