opengeospatial / ogcapi-processes

https://ogcapi.ogc.org/processes
Other
49 stars 45 forks source link

lost in OpenAPI validation errors / code generation #390

Open arneschilling opened 10 months ago

arneschilling commented 10 months ago

Hi,

according to the OpenAPI Validator on https://apitools.dev/swagger-parser/online/

the official yaml schema from https://[schemas.opengis.net/ogcapi/processes/part1/1.0/openapi/ogcapi-processes-1.yaml](https://schemas.opengis.net/ogcapi/processes/part1/1.0/openapi/ogcapi-processes-1.yaml)

is invalid. What do you think about it?

I could not find any tool for generating code from the OpenAPI apecification that works. All Tools seem to use swagger model and produce errors like this one -Cannot invoke "io.swagger.v3.oas.models.media.Schema.get$ref()" because "items" is null

No code is generated because the model validation fails. no hint given anywhere where to look for an error

I tried the openApiGenerate gradle task as well al the nvm cli package, but were not able to produce any results. I also tried the schema found in the 1.0.0-maintenance tag of this repo, same problems here. What exactly do you expect from software developers? Is there any recommended way how to exploit the benefits of an OpenAPI description as to automatic code generation?

best regards, Arne

jerstlouis commented 10 months ago

Hi @arneschilling ,

In theory, the OpenAPI description examples should validate in Swagger, but there may be some small issues causing errors. I have ran into issues with recursive references in the past in particular.

I suggest that the SWGs look at the state of the OpenAPI example definition on the official schemas for Part 1 at the earliest opportunity (we probably meet next Monday morning).

In the meantime, you may also look at the latest draft API definition at:

https://github.com/opengeospatial/ogcapi-processes/tree/master/openapi

which may be in a better or worst state (there is at least one open issue ( #370 ) assigned to me about that one).

We also have an OpenAPI definition that does validate with Swagger for our implementation which is one the two reference implementations:

https://maps.gnosis.earth/ogcapi/api

And the other GeoLabs reference implementation validates successfully as well:

http://tb17.geolabs.fr:8119/swagger-ui/oapip/

so you way want to compare the API definitions with that.

If you figure out what is wrong with the example 1.0 schemas before we do, feedback on what needs to be fixed here would be welcomed.

I agree we should have something easy to use. We will try to address the issue and/or provide better guidance on how to use it ASAP.

Thank you!

-Jerome

ghobona commented 10 months ago

@arneschilling

We use SwaggerHub and Swagger Editor to validate conformance to the OpenAPI 3 specification.

Swagger Editor reports the API definition document as valid.

I did however need to change the referenced URIs from http://schemas.opengis.net to https://schemas.opengis.net. This is because of going across two different levels of browser security domains (i.e. from https to http). So I will take an action to update the referenced URIs.

Please note that once the referenced URIs have been changed to https, the apitools.dev validator also reports the API definition document as valid...but that the validator cannot display it because of circular references. See the attached screenshot.

Screenshot 2024-01-15 at 15 19 20

arneschilling commented 10 months ago

@ghobona , what is the source of the content in your seconds screenshot? File https://[schemas.opengis.net/ogcapi/processes/part1/1.0/openapi/ogcapi-processes-1.yaml](https://schemas.opengis.net/ogcapi/processes/part1/1.0/openapi/ogcapi-processes-1.yaml) has an invalid character in line 3 (colon). After removing it, I get more errors:

image

ghobona commented 10 months ago

@arneschilling The reason is the browser-based application is running at https level, whereas the imports in the file are at http level.

To fix the issue, in the file itself, select all http://schemas.opengis.net and replace them with https://schemas.opengis.net.

fmigneault commented 10 months ago

Some issues might relate to https://github.com/opengeospatial/ogcapi-processes/pull/371 as well.

arneschilling commented 10 months ago

okay, at least I got swagger editor to validate the yaml if I replace all http by https, which is understandable. I still cannot use the code generators on swagger editor though (Generate Server, Generate client drop down). image

arneschilling commented 10 months ago

I will share a little gradle project using the org.openapi.generator plugin. The setup is rather simple:


plugins {
    id 'java-library'
    id "org.openapi.generator" version "7.2.0"
}

repositories {
    mavenCentral()
}

dependencies {
}

java {
    toolchain {
        languageVersion = JavaLanguageVersion.of(17)
    }
}

openApiGenerate {
    generatorName.set("java")
    inputSpec.set("$rootDir/schemas/ogcapi/processes/withUrls.yaml")
    outputDir.set("$buildDir/generated")
    apiPackage.set("net.opengis.processes.api")
    invokerPackage.set("net.opengis.processes.invoker")
    modelPackage.set("net.opengis.processes.model")

}

openApiValidate {
    inputSpec.set("$rootDir/schemas/ogcapi/processes/withUrls.yaml")
}

File withUrls.yaml contains https links as described above.
This produces the following output on the console:

```Working Directory: C:\Users\aschilling\eclipse-workspace\ogcapi
Gradle user home: C:\Users\aschilling\.gradle
Gradle Distribution: Gradle wrapper from target build
Gradle Version: 8.1.1
Java Home: C:\Program Files\Java\jdk-17.0.2
JVM Arguments: None
Program Arguments: None
Build Scans Enabled: false
Offline Mode Enabled: false
Gradle Tasks: clean openApiValidate

> Task :processes:clean UP-TO-DATE

> Task :processes:openApiValidate
Validating spec C:\Users\aschilling\eclipse-workspace\ogcapi/schemas/ogcapi/processes/withUrls.yaml
Exception while resolving:
java.lang.NullPointerException: Cannot invoke "io.swagger.v3.oas.models.media.Schema.get$ref()" because "items" is null
    at io.swagger.v3.parser.processors.SchemaProcessor.processArraySchema(SchemaProcessor.java:218)
    at io.swagger.v3.parser.processors.SchemaProcessor.processSchemaType(SchemaProcessor.java:69)
    at io.swagger.v3.parser.processors.SchemaProcessor.processComposedSchema(SchemaProcessor.java:167)
    at io.swagger.v3.parser.processors.SchemaProcessor.processSchemaType(SchemaProcessor.java:72)
    at io.swagger.v3.parser.processors.SchemaProcessor.processSchema(SchemaProcessor.java:61)
    at io.swagger.v3.parser.processors.ResponseProcessor.processResponse(ResponseProcessor.java:56)
    at io.swagger.v3.parser.processors.OperationProcessor.processOperation(OperationProcessor.java:86)
    at io.swagger.v3.parser.processors.PathsProcessor.processPaths(PathsProcessor.java:88)
    at io.swagger.v3.parser.OpenAPIResolver.resolve(OpenAPIResolver.java:72)
    at io.swagger.v3.parser.OpenAPIResolver.resolve(OpenAPIResolver.java:59)
    at io.swagger.v3.parser.OpenAPIV3Parser.resolve(OpenAPIV3Parser.java:238)
    at io.swagger.v3.parser.OpenAPIV3Parser.readContents(OpenAPIV3Parser.java:181)
    at io.swagger.v3.parser.OpenAPIV3Parser.readLocation(OpenAPIV3Parser.java:97)
    at io.swagger.parser.OpenAPIParser.readLocation(OpenAPIParser.java:16)
    at org.openapitools.generator.gradle.plugin.tasks.ValidateTask.doWork(ValidateTask.kt:82)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:568)
    at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:125)
    at org.gradle.api.internal.project.taskfactory.StandardTaskAction.doExecute(StandardTaskAction.java:58)
    at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:51)
    at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:29)
    at org.gradle.api.internal.tasks.execution.TaskExecution$3.run(TaskExecution.java:242)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:29)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:26)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:47)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:68)
    at org.gradle.api.internal.tasks.execution.TaskExecution.executeAction(TaskExecution.java:227)
    at org.gradle.api.internal.tasks.execution.TaskExecution.executeActions(TaskExecution.java:210)
    at org.gradle.api.internal.tasks.execution.TaskExecution.executeWithPreviousOutputFiles(TaskExecution.java:193)
    at org.gradle.api.internal.tasks.execution.TaskExecution.execute(TaskExecution.java:166)
    at org.gradle.internal.execution.steps.ExecuteStep.executeInternal(ExecuteStep.java:105)
    at org.gradle.internal.execution.steps.ExecuteStep.access$000(ExecuteStep.java:44)
    at org.gradle.internal.execution.steps.ExecuteStep$1.call(ExecuteStep.java:59)
    at org.gradle.internal.execution.steps.ExecuteStep$1.call(ExecuteStep.java:56)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:199)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:73)
    at org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:56)
    at org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:44)
    at org.gradle.internal.execution.steps.RemovePreviousOutputsStep.execute(RemovePreviousOutputsStep.java:67)
    at org.gradle.internal.execution.steps.RemovePreviousOutputsStep.execute(RemovePreviousOutputsStep.java:37)
    at org.gradle.internal.execution.steps.CancelExecutionStep.execute(CancelExecutionStep.java:41)
    at org.gradle.internal.execution.steps.TimeoutStep.executeWithoutTimeout(TimeoutStep.java:74)
    at org.gradle.internal.execution.steps.TimeoutStep.execute(TimeoutStep.java:55)
    at org.gradle.internal.execution.steps.CreateOutputsStep.execute(CreateOutputsStep.java:50)
    at org.gradle.internal.execution.steps.CreateOutputsStep.execute(CreateOutputsStep.java:28)
    at org.gradle.internal.execution.steps.CaptureStateAfterExecutionStep.executeDelegateBroadcastingChanges(CaptureStateAfterExecutionStep.java:100)
    at org.gradle.internal.execution.steps.CaptureStateAfterExecutionStep.execute(CaptureStateAfterExecutionStep.java:72)
    at org.gradle.internal.execution.steps.CaptureStateAfterExecutionStep.execute(CaptureStateAfterExecutionStep.java:50)
    at org.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:40)
    at org.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:29)
    at org.gradle.internal.execution.steps.BuildCacheStep.executeWithoutCache(BuildCacheStep.java:166)
    at org.gradle.internal.execution.steps.BuildCacheStep.lambda$execute$1(BuildCacheStep.java:70)
    at org.gradle.internal.Either$Right.fold(Either.java:175)
    at org.gradle.internal.execution.caching.CachingState.fold(CachingState.java:59)
    at org.gradle.internal.execution.steps.BuildCacheStep.execute(BuildCacheStep.java:68)
    at org.gradle.internal.execution.steps.BuildCacheStep.execute(BuildCacheStep.java:46)
    at org.gradle.internal.execution.steps.StoreExecutionStateStep.execute(StoreExecutionStateStep.java:36)
    at org.gradle.internal.execution.steps.StoreExecutionStateStep.execute(StoreExecutionStateStep.java:25)
    at org.gradle.internal.execution.steps.RecordOutputsStep.execute(RecordOutputsStep.java:36)
    at org.gradle.internal.execution.steps.RecordOutputsStep.execute(RecordOutputsStep.java:22)
    at org.gradle.internal.execution.steps.SkipUpToDateStep.executeBecause(SkipUpToDateStep.java:91)
    at org.gradle.internal.execution.steps.SkipUpToDateStep.lambda$execute$2(SkipUpToDateStep.java:55)
    at java.base/java.util.Optional.orElseGet(Optional.java:364)
    at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:55)
    at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:37)
    at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:65)
    at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:36)
    at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:37)
    at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:27)
    at org.gradle.internal.execution.steps.ResolveCachingStateStep.execute(ResolveCachingStateStep.java:76)
    at org.gradle.internal.execution.steps.ResolveCachingStateStep.execute(ResolveCachingStateStep.java:37)
    at org.gradle.internal.execution.steps.ValidateStep.execute(ValidateStep.java:94)
    at org.gradle.internal.execution.steps.ValidateStep.execute(ValidateStep.java:49)
    at org.gradle.internal.execution.steps.CaptureStateBeforeExecutionStep.execute(CaptureStateBeforeExecutionStep.java:71)
    at org.gradle.internal.execution.steps.CaptureStateBeforeExecutionStep.execute(CaptureStateBeforeExecutionStep.java:45)
    at org.gradle.internal.execution.steps.SkipEmptyWorkStep.executeWithNonEmptySources(SkipEmptyWorkStep.java:177)
    at org.gradle.internal.execution.steps.SkipEmptyWorkStep.execute(SkipEmptyWorkStep.java:81)
    at org.gradle.internal.execution.steps.SkipEmptyWorkStep.execute(SkipEmptyWorkStep.java:53)
    at org.gradle.internal.execution.steps.RemoveUntrackedExecutionStateStep.execute(RemoveUntrackedExecutionStateStep.java:32)
    at org.gradle.internal.execution.steps.RemoveUntrackedExecutionStateStep.execute(RemoveUntrackedExecutionStateStep.java:21)
    at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsStartedStep.execute(MarkSnapshottingInputsStartedStep.java:38)
    at org.gradle.internal.execution.steps.LoadPreviousExecutionStateStep.execute(LoadPreviousExecutionStateStep.java:36)
    at org.gradle.internal.execution.steps.LoadPreviousExecutionStateStep.execute(LoadPreviousExecutionStateStep.java:23)
    at org.gradle.internal.execution.steps.CleanupStaleOutputsStep.execute(CleanupStaleOutputsStep.java:75)
    at org.gradle.internal.execution.steps.CleanupStaleOutputsStep.execute(CleanupStaleOutputsStep.java:41)
    at org.gradle.internal.execution.steps.AssignWorkspaceStep.lambda$execute$0(AssignWorkspaceStep.java:32)
    at org.gradle.api.internal.tasks.execution.TaskExecution$4.withWorkspace(TaskExecution.java:287)
    at org.gradle.internal.execution.steps.AssignWorkspaceStep.execute(AssignWorkspaceStep.java:30)
    at org.gradle.internal.execution.steps.AssignWorkspaceStep.execute(AssignWorkspaceStep.java:21)
    at org.gradle.internal.execution.steps.IdentityCacheStep.execute(IdentityCacheStep.java:37)
    at org.gradle.internal.execution.steps.IdentityCacheStep.execute(IdentityCacheStep.java:27)
    at org.gradle.internal.execution.steps.IdentifyStep.execute(IdentifyStep.java:47)
    at org.gradle.internal.execution.steps.IdentifyStep.execute(IdentifyStep.java:34)
    at org.gradle.internal.execution.impl.DefaultExecutionEngine$1.execute(DefaultExecutionEngine.java:64)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.java:146)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:135)
    at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:46)
    at org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter.execute(ResolveTaskExecutionModeExecuter.java:51)
    at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:57)
    at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:74)
    at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:36)
    at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:77)
    at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:55)
    at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:52)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:199)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:73)
    at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:52)
    at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:42)
    at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:337)
    at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:324)
    at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:317)
    at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:303)
    at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:463)
    at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:380)
    at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
    at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:49)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
    at java.base/java.lang.Thread.run(Thread.java:833)
Failed to get the schema name: https://schemas.opengis.net/ogcapi/processes/part1/1.0/openapi/schemas/processSummary.yaml
Failed to obtain schema from null
Failed to get the schema name: https://schemas.opengis.net/ogcapi/processes/part1/1.0/openapi/schemas/processSummary.yaml
Failed to obtain schema from null
Failed to get the schema name: https://schemas.opengis.net/ogcapi/processes/part1/1.0/openapi/schemas/link.yaml
Failed to get the schema name: https://schemas.opengis.net/ogcapi/processes/part1/1.0/openapi/schemas/link.yaml
Failed to get the schema name: https://schemas.opengis.net/ogcapi/processes/part1/1.0/openapi/schemas/processSummary.yaml
Failed to get the schema name: https://schemas.opengis.net/ogcapi/processes/part1/1.0/openapi/schemas/processSummary.yaml
Failed to get the schema name: https://schemas.opengis.net/ogcapi/processes/part1/1.0/openapi/schemas/link.yaml
Failed to get the schema name: https://schemas.opengis.net/ogcapi/processes/part1/1.0/openapi/schemas/link.yaml
Failed to get the schema name: https://schemas.opengis.net/ogcapi/processes/part1/1.0/openapi/schemas/processSummary.yaml
Failed to get the schema name: https://schemas.opengis.net/ogcapi/processes/part1/1.0/openapi/schemas/processSummary.yaml
Failed to get the schema name: https://schemas.opengis.net/ogcapi/processes/part1/1.0/openapi/schemas/inputDescription.yaml
Failed to get the schema name: https://schemas.opengis.net/ogcapi/processes/part1/1.0/openapi/schemas/inputDescription.yaml
Failed to get the schema name: https://schemas.opengis.net/ogcapi/processes/part1/1.0/openapi/schemas/outputDescription.yaml
Failed to get the schema name: https://schemas.opengis.net/ogcapi/processes/part1/1.0/openapi/schemas/outputDescription.yaml
Failed to get the schema name: https://schemas.opengis.net/ogcapi/processes/part1/1.0/openapi/schemas/statusInfo.yaml
Failed to get the schema name: https://schemas.opengis.net/ogcapi/processes/part1/1.0/openapi/schemas/statusInfo.yaml
Failed to get the schema name: https://schemas.opengis.net/ogcapi/processes/part1/1.0/openapi/schemas/link.yaml
Failed to get the schema name: https://schemas.opengis.net/ogcapi/processes/part1/1.0/openapi/schemas/link.yaml
Failed to get the schema name: https://schemas.opengis.net/ogcapi/processes/part1/1.0/openapi/schemas/inlineOrRefData.yaml
Failed to get the schema name: https://schemas.opengis.net/ogcapi/processes/part1/1.0/openapi/schemas/inlineOrRefData.yaml
Failed to get the schema name: https://schemas.opengis.net/ogcapi/processes/part1/1.0/openapi/schemas/inlineOrRefData.yaml
Failed to get the schema name: https://schemas.opengis.net/ogcapi/processes/part1/1.0/openapi/schemas/inlineOrRefData.yaml
Failed to get the schema name: https://schemas.opengis.net/ogcapi/processes/part1/1.0/openapi/schemas/output.yaml
Failed to get the schema name: https://schemas.opengis.net/ogcapi/processes/part1/1.0/openapi/schemas/output.yaml
Failed to get the schema name: https://schemas.opengis.net/ogcapi/processes/part1/1.0/openapi/schemas/subscriber.yaml
Failed to get the schema name: https://schemas.opengis.net/ogcapi/processes/part1/1.0/openapi/schemas/subscriber.yaml
Failed to get the schema name: https://schemas.opengis.net/ogcapi/processes/part1/1.0/openapi/schemas/results.yaml
Failed to get the schema name: https://schemas.opengis.net/ogcapi/processes/part1/1.0/openapi/schemas/results.yaml
Failed to get the schema name: https://schemas.opengis.net/ogcapi/processes/part1/1.0/openapi/responses/ExecuteAsync.yaml
Failed to get the schema name: https://schemas.opengis.net/ogcapi/processes/part1/1.0/openapi/responses/NotFound.yaml
Failed to get the schema name: https://schemas.opengis.net/ogcapi/processes/part1/1.0/openapi/responses/ServerError.yaml
Failed to get the schema name: https://schemas.opengis.net/ogcapi/processes/part1/1.0/openapi/schemas/results.yaml
Failed to get the schema name: https://schemas.opengis.net/ogcapi/processes/part1/1.0/openapi/schemas/results.yaml
Failed to get the schema name: https://schemas.opengis.net/ogcapi/processes/part1/1.0/openapi/parameters/jobId.yaml
Failed to get the schema name: https://schemas.opengis.net/ogcapi/processes/part1/1.0/openapi/responses/Status.yaml
Failed to get the schema name: https://schemas.opengis.net/ogcapi/processes/part1/1.0/openapi/responses/NotFound.yaml
Failed to get the schema name: https://schemas.opengis.net/ogcapi/processes/part1/1.0/openapi/responses/ServerError.yaml
Failed to get the schema name: https://schemas.opengis.net/ogcapi/processes/part1/1.0/openapi/parameters/jobId.yaml
Failed to get the schema name: https://schemas.opengis.net/ogcapi/processes/part1/1.0/openapi/responses/Status.yaml
Failed to get the schema name: https://schemas.opengis.net/ogcapi/processes/part1/1.0/openapi/responses/NotFound.yaml
Failed to get the schema name: https://schemas.opengis.net/ogcapi/processes/part1/1.0/openapi/responses/ServerError.yaml
Failed to get the schema name: https://schemas.opengis.net/ogcapi/processes/part1/1.0/openapi/parameters/jobId.yaml
Failed to get the schema name: https://schemas.opengis.net/ogcapi/processes/part1/1.0/openapi/responses/Results.yaml
Failed to get the schema name: https://schemas.opengis.net/ogcapi/processes/part1/1.0/openapi/responses/NotFound.yaml
Failed to get the schema name: https://schemas.opengis.net/ogcapi/processes/part1/1.0/openapi/responses/ServerError.yaml
Failed to get the schema name: https://schemas.opengis.net/ogcapi/processes/part1/1.0/openapi/schemas/link.yaml
Failed to get the schema name: https://schemas.opengis.net/ogcapi/processes/part1/1.0/openapi/schemas/processSummary.yaml
Failed to get the schema name: https://schemas.opengis.net/ogcapi/processes/part1/1.0/openapi/schemas/link.yaml
Failed to get the schema name: https://schemas.opengis.net/ogcapi/processes/part1/1.0/openapi/schemas/processSummary.yaml
Failed to get the schema name: https://schemas.opengis.net/ogcapi/processes/part1/1.0/openapi/schemas/inputDescription.yaml
Failed to get the schema name: https://schemas.opengis.net/ogcapi/processes/part1/1.0/openapi/schemas/outputDescription.yaml
Failed to get the schema name: https://schemas.opengis.net/ogcapi/processes/part1/1.0/openapi/schemas/statusInfo.yaml
Failed to get the schema name: https://schemas.opengis.net/ogcapi/processes/part1/1.0/openapi/schemas/link.yaml
Failed to get the schema name: https://schemas.opengis.net/ogcapi/processes/part1/1.0/openapi/schemas/inlineOrRefData.yaml
Failed to get the schema name: https://schemas.opengis.net/ogcapi/processes/part1/1.0/openapi/schemas/inlineOrRefData.yaml
Failed to get the schema name: https://schemas.opengis.net/ogcapi/processes/part1/1.0/openapi/schemas/output.yaml
Failed to get the schema name: https://schemas.opengis.net/ogcapi/processes/part1/1.0/openapi/schemas/subscriber.yaml
Failed to get the schema name: https://schemas.opengis.net/ogcapi/processes/part1/1.0/openapi/parameters/jobId.yaml
Failed to get the schema name: https://schemas.opengis.net/ogcapi/processes/part1/1.0/openapi/parameters/jobId.yaml
Failed to get the schema name: https://schemas.opengis.net/ogcapi/processes/part1/1.0/openapi/parameters/jobId.yaml

Spec is invalid.
Issues:

    Cannot invoke "io.swagger.v3.oas.models.media.Schema.get$ref()" because "items" is null

> Task :processes:openApiValidate FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':processes:openApiValidate'.
> Validation failed.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 2s
2 actionable tasks: 1 executed, 1 up-to-date
ghobona commented 10 months ago

@arneschilling This comment does not really offer a solution, but hopefully it will offer some insight into previous discussion on code generators.

Testbed-17 experimented with code generators and reported on the outcomes here.

ghobona commented 9 months ago

The example has been updated so that all of the imports/references now use https URLs.

bpross-52n commented 5 months ago

@ghobona @arneschilling Is this issue resolved now? If yes, please close it. Thanks!

bpross-52n commented 3 months ago

SWG meeting from 2024-08-05: @pvretano will follow up on this issue.

drewm-jpl commented 2 months ago

At NASA JPL, we are attempting to utilize this repo's OpenAPI specification for the OGC Processes API. This issue is making it incredibly difficult to create an implementation of the API.

ghobona commented 2 months ago

@arneschilling @drewm-jpl There is a note about code generators and their limitations in this OGC Testbed-17 engineering report. See sections 7.5.1 and 8.

We were subsequently able to address some of the issues by publishing the schemas bundled into a single example OpenAPI definition file, as an additional resource for developers. An example of such a file is on SwaggerHub.

@pvretano can provide further advice.