Giter Site home page Giter Site logo

Comments (18)

cportele avatar cportele commented on June 3, 2024

Actually, this is by design. There is no requirement to have an application schema or even feature types in the Core. Since the Core does not support filtering in CQL or similar, the API should be usable without an application schema. In extensions this will clearly change, both because sometimes it is important for data providers or users to be explicit about the schema / support validation and to be able to formulate queries.

By the way, in a handcrafted OpenAPI 2.0 / Swagger variant for one of our demo services we have indeed specified the schema of the features in the OpenAPI definition: https://app.swaggerhub.com/apis/cportele/lika-nrw/0.0.1. In an OpenAPI. In an OpenAPI context this would seem to be the most "natural" approach to me, but it mostly works for JSON encoded data and less for data in XML or other encodings (see also #58).

from ogcapi-features.

cportele avatar cportele commented on June 3, 2024

@rouault We had a discussion here at the hackathon and basically identified three approaches for providing schema information:

  1. as part of the OpenAPI definition (see my example above)
  2. using links from the collection (see /rec/core/fc-md-descriptions)
  3. using a separate endpoint /schema under the collection (the Cubewerx server supports this)

They all have their role / advantages. The first one is easiest for users that do not know or care about WFS and "just" want to use an API. This also leverages the OpenAPI stack and tooling. The second one supports the hypermedia approach and one can determine the schema etc. when accessing and navigating through the information. The third option publishes the information about the schema resource already in the OpenAPI definition. Since all three have their use we want to "allow" all of them.

The first option has a lot of potential for new users, so we agreed that this has a priority for experimenting with it. Peter is looking into supporting it in his implementation.

@pvretano, @cholmes - does this capture the main points of our discussion?

from ogcapi-features.

cholmes avatar cholmes commented on June 3, 2024

Yup. And to emphasize the key point: Even should try to implement client support for 1., using https://app.swaggerhub.com/apis/cportele/lika-nrw/0.0.1 And @pvretano will post his implementation here when it's up.

Having that in GDAL client will likely make it a defacto recommendation, for those who write servers and test with GDAL. It'll be good to have GDAL to not have to rely on the schema, but it'd be great to code up the support for reading the schema.

from ogcapi-features.

rouault avatar rouault commented on June 3, 2024

@cholmes https://app.swaggerhub.com/apis/cportele/lika-nrw/0.0.1 is Swagger/OpenAPI 2.0 . It needs to be "ported" to the /api openapi 3.0 first as I'm not fluent enough in openapi to anticipate what it would look like. But yes that's certainly a reasonable option.

from ogcapi-features.

cholmes avatar cholmes commented on June 3, 2024

@rouault - gotcha. I talked to @cportele and he said he'd try to update it, but he's got a lot going on. Will update this ticket if it gets done.

from ogcapi-features.

cportele avatar cportele commented on June 3, 2024

@rouault - I have tried to compile an OpenAPI 3.0 version. I did not have much time to verify it, let me know, if you hit any issues.

https://raw.githubusercontent.com/opengeospatial/wfs3hackathon/master/openapi.json

from ogcapi-features.

rouault avatar rouault commented on June 3, 2024

@cportele Thanks I've just added support for it in the GDAL driver.
OGR_WFS3_API_URL=https://raw.githubusercontent.com/opengeospatial/wfs3hackathon/master/openapi.json ogrinfo WFS3:https://www.ldproxy.nrw.de/kataster flurstueck -al -q
(the OGR_WFS3_API_URL is a hack to use an alternate URL for the /api endpoint)

I'm thinking that the geometry type could also be advertized by specializing the following and indicating which type(s) are possible

          "geometry": {
            "$ref": "#/components/schemas/geometryGeoJSON"
          },

from ogcapi-features.

aaime avatar aaime commented on June 3, 2024

I'm a bit worried about the size of the resulting API document, installations with thousands of layers are not uncommon (the uncommon ones have hundred of thousands of layers), the API document already has a fair amount of redundancy, if all the schemas are also added in it, it will become really large...

from ogcapi-features.

cportele avatar cportele commented on June 3, 2024

@rouault - Thanks, forgot to be update to MultiPolygon only

@aaime - Yes, for servers with many collections that is clearly an issue. I think for these cases the approach to document the schema in the OpenAPI does not work and the OpenAPI definition should fallback to just

  • /{name}
  • /{name}/{id}

instead of a specific description of each collection.

from ogcapi-features.

cportele avatar cportele commented on June 3, 2024

Discussion in 2018-03-13 web-meeting: No action needed for the Core.

Links to schemas in current implementations:

from ogcapi-features.

cmheazel avatar cmheazel commented on June 3, 2024

OpenAPI issue 1532 may help here. It is a proposal to allow multiple alternate schemas in the Media Type object. These alternate schemas are not restricted to JSON schema. This allows us to specify multiple schemas in the Response Object, including XML (GML) schema. This feature is likely to make it into the next version of OpenAPI. If this is a feature we want to use, please let me know so that I can argue for the requirement in the TSC.

from ogcapi-features.

cportele avatar cportele commented on June 3, 2024

@cmheazel - Yes, I think that change would be good for supporting XML schema. We knew the current XML support is not really sufficient and so removed all the XML snippets from the OpenAPI examples waiting for an approach to XML that allows us to leverage "our" XML schemas. This approach also avoids the clutter of XML snippets that OpenAPI 3.0 has.

from ogcapi-features.

cmheazel avatar cmheazel commented on June 3, 2024

@cportele - Thanks. I'll put together an update reflecting the discussions at Mondays TSC meeting. We can discuss specific requirements under this issue.

from ogcapi-features.

mdastous-bentley avatar mdastous-bentley commented on June 3, 2024

I'm interested in this topic as well, is there a document that summarizes the different options to get the feature(s) schema? My understanding is that, WFS 3.0 will be mainly schema-less, but a schema could be available on some implementations.

from ogcapi-features.

cportele avatar cportele commented on June 3, 2024

This should be addressed by #129 (schema links from the API definition) and #126 (schema links from the resources).

from ogcapi-features.

cportele avatar cportele commented on June 3, 2024

06-MAY-2019 Conference call: Keep it open until #129 is resolved.

from ogcapi-features.

cmheazel avatar cmheazel commented on June 3, 2024

See Pull Request #256
This may address at least some of the requirements.

from ogcapi-features.

cportele avatar cportele commented on June 3, 2024

Code Sprint 2024-02-27: A draft of "Part 5: Schemas" exists and addresses the need for a feature schema. The part is expected to be submitted for OGC Architecture Board Review and then Public Comment soon. We are, therefore, closing this issue and invite comments on the draft of Part 5.

from ogcapi-features.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.