Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

https://archive.org/services/purl/goodrelations/v1.owl doesn't exist #428

Open
ollietb opened this issue Aug 22, 2024 · 3 comments
Open

Comments

@ollietb
Copy link

ollietb commented Aug 22, 2024

API Platform version(s) affected: latest schema.phar

Description

I'm trying to generate classes from an OpenAPI yaml file and when I run the command

./schema.phar generate src2/ ./config/schema.yaml  -vv

I get the following error

PHP Warning:  SimpleXMLElement::__construct(https://archive.org/services/purl/goodrelations/v1.owl): Failed to open stream: Connection refused in phar:///var/www/html/schema.phar/src/Schema/Generator.php on line 51
PHP Warning:  SimpleXMLElement::__construct(): I/O warning : failed to load external entity "https://archive.org/services/purl/goodrelations/v1.owl" in phar:///var/www/html/schema.phar/src/Schema/Generator.php on line 51

In Generator.php line 51:
                                     
  [Exception]                        
  String could not be parsed as XML  
                                     

Exception trace:
  at phar:///var/www/html/schema.phar/src/Schema/Generator.php:51
 SimpleXMLElement->__construct() at phar:///var/www/html/schema.phar/src/Schema/Generator.php:51
 ApiPlatform\SchemaGenerator\Schema\Generator->generate() at phar:///var/www/html/schema.phar/src/Command/GenerateCommand.php:132
 ApiPlatform\SchemaGenerator\Command\GenerateCommand->execute() at phar:///var/www/html/schema.phar/vendor/symfony/console/Command/Command.php:326
 Symfony\Component\Console\Command\Command->run() at phar:///var/www/html/schema.phar/vendor/symfony/console/Application.php:1063
 Symfony\Component\Console\Application->doRunCommand() at phar:///var/www/html/schema.phar/vendor/symfony/console/Application.php:320
 Symfony\Component\Console\Application->doRun() at phar:///var/www/html/schema.phar/vendor/symfony/console/Application.php:174
 Symfony\Component\Console\Application->run() at phar:///var/www/html/schema.phar/bin/schema:26
 require() at /var/www/html/schema.phar:17

How to reproduce

Download an OpenAPI spec and create a schema.yaml

openApi:
    file: 'Street-OpenAPI.yaml'

Then run the generate command.

Is https://archive.org/services/purl/goodrelations/v1.owl an old url that doesn't exist anymore?

@dunglas
Copy link
Member

dunglas commented Aug 22, 2024

That's weird, the URL resolves for me, but it's a redirection, that's maybe the issue.

@gasparakos
Copy link
Contributor

I have the same problem.
I found this: http://ebusiness-unibw.org/pipermail/goodrelations/2014-July/000548.html
So the url in

public const GOOD_RELATIONS_URI = 'https://archive.org/services/purl/goodrelations/v1.owl';
should be:
http://www.heppnetz.de/ontologies/goodrelations/v1.owl

@dunglas
Copy link
Member

dunglas commented Oct 20, 2024

Hi, see mfhepp/goodrelations#1 (comment)

PR welcome to fix the tests!

gasparakos added a commit to gasparakos/schema-generator that referenced this issue Oct 23, 2024
dunglas pushed a commit that referenced this issue Oct 23, 2024
* Replace inactive URL in GOOD_RELATIONS_URI

Fix for #428

* Fix test URI
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants