renderErrorMessages example

        // The public Web validator returns an object with an empty (schemaValidation)Messages array         $messages = array_merge(
            $content['messages'] ?? [],
            $content['schemaValidationMessages'] ?? []
        );

        if (\count($messages) === 0) {
            return Command::SUCCESS;
        }

        $style = new ShopwareStyle($input$output);
        $this->renderErrorMessages($style$messages);

        return Command::FAILURE;
    }

    /** * @param array<string, string|array<mixed>> $messages */
    private function renderErrorMessages(ShopwareStyle $style, array $messages): void
    {
        $style->error('The OpenAPI schema is invalid:');
        $table = $style->createTable();
        
Home | Imprint | This part of the site doesn't use cookies.