Changeset 950


Ignore:
Timestamp:
Sep 6, 2019, 12:38:00 PM (2 months ago)
Author:
djay
Message:

Add documentation for the oas.cfg file and clean it a bit.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/docs/install/installation.rst

    r920 r950  
    277277  $ ./configure --with-xml2config=/usr/local/bin/xml2-config
    278278
     279OGC API - Processing Support (Optional)
     280****************************************
     281
     282In case you want to activate the support for `OGC API - Processing
     283<https://github.com/opengeospatial/wps-rest-binding>`__, you
     284can do so by using the *--with-json*: You will then need to coy the
     285``oas.cfg`` file in the same directory as your ``main.cfg``. For
     286instance, one may use the following command:
     287
     288::
     289
     290  $ ./configure --with-json=/usr/
     291 
    279292Python Support (Optional)
    280293**************************
  • trunk/docs/kernel/configuration.rst

    r946 r950  
    429429  included services if the ``libPath`` parameter is not set.
    430430
    431      
     431
     432OpenAPI Specification configuration file
     433-----------------------------------------
     434
     435Since revision 949 of the ZOO-Kernel, you can now activate the OGC
     436API - Processing support. In such a case you will need to have an
     437``oas.cfg`` file located in tne same directory where the ``main.cfg`` is.
     438
     439This ``oas.cfg`` file gets the same syntactic rules than the
     440``main.cfg``. The ZOO-Kernel uses this file to produce information
     441about the open API specification it is referring to.
     442
     443The first section to be found in the ``oas.cfg`` file should be the
     444``[openapi]``. It contains the following parameters:
     445
     446 * ``rootUrl``: the URL to access the ZOO-Kernel using OGC API - Processing
     447 * ``links``: the links provided from the root
     448 * ``paths``: the full paths list
     449 * ``parameters``: the parameters list defined in paths
     450 * ``header_parameters``: the parameters list client applications can send as header
     451 * ``version``: the Open API Specification version
     452   
     453For any links and paths ``/A`` defined, you will have a corresponding
     454``[/A]`` and ``[A]`` sections. In the ``[/A]`` section you will define
     455the rel, type and title used from the root URL to produce the `links
     456<https://github.com/opengeospatial/wps-rest-binding/blob/master/core/openapi/schemas/link.yaml>`__
     457list and the `paths object
     458<https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#pathsObject>`__
     459from. In the corresponding ``[A]`` section, you will define the
     460following parameters:
     461
     462 * ``method``: the HTTP method to use to access this resource
     463 * ``title``: resource title
     464 * ``abstract``: resource description
     465 * ``tags``: tags to classify this resource
     466 * ``tags_description``: the tag description
     467 * ``schema``: the schema specifying the resource
     468
     469In case you want to define multiple methods to access a resource,  you
     470can then use the length parameter to define the number of parameters
     471group to parse, then use ``method_1``, ``title_1``, ``abstract_1``,
     472``tags_1``, ``tags_description_1`` and ``schema_1`` and so on to add
     473one or more access method (and other attributes) to this resource.
     474
     475When declaring resource access you may want to add a parameter to your
     476request. In such a case, you can add a parameter named "parameters"
     477which contain the supported parameters list. All parameters defined
     478should be rooted in the components field. Parameters which can be used
     479in the path will be identified by ``{NAME}`` and will get a specific
     480section for its definition:
     481
     482 * ``type``: nature of the parameter (i.e. string)
     483 * ``title``: parameter title
     484 * ``abstract``: parameter description
     485 * ``in``: where the parameter can be used (ie. path, header, query)
     486 * ``required``: define if the parameter is optional (false) or not (true)
     487 * ``example``: (optional) provide an example value / URL
     488   
     489In addition to the sections defined previously, there are three other
     490sections that we did not cover yet. Theses sections are:
     491
     492 * ``[requestBody]``: defining the request body abstract (description), type (application/json) and schema (reference).
     493 * ``[exception]``: defining the exception bastract (description), type (application/json) and schema (reference).
     494 * ``[conformTo]``: referring to links list of the requirements classes the server implements and conforms to
     495
     496For more information on how to interact with this WPS REST Binding, please refer
     497to this `page
     498<https://github.com/opengeospatial/wps-rest-binding#overview>`__ or use
     499the `Swagger UI <https://swagger.io/tools/swagger-ui/>`__. A live
     500instance is available `here <https://demo.mapmint.com/swagger-ui/dist/>`__.
     501 
    432502.. rubric:: Footnotes
    433503
  • trunk/zoo-project/zoo-kernel/oas.cfg

    r949 r950  
    11[openapi]
    22rootUrl=https://demo.mapmint.com/wps3/
    3 links=/,/api,,/conformance,/processes
     3links=/,/api,/conformance,/processes
    44paths=/root,/api,/conformance,/processes,/processes/{id},/processes/{id}/jobs,/processes/{id}/jobs/{jobID},/processes/{id}/jobs/{jobID}/result
    5 paths2=,/processes/{id}/jobs/{jobID}/result/{resultID}
    6 paths1=p,processes/{id}/jobs,,processes/{id}/jobs/{jobID}
    75parameters=id,jobID,resultID
    86header_parameters=oas-header1,oas-header2
     
    8179tags=ProcessDescription
    8280tags_description=
    83 schemat=https://demo.mapmint.com/wps-rest-binding/core/openapi/schemas/process.yaml
    84 schematr=https://raw.githubusercontent.com/opengeospatial/wps-rest-binding/master/core/openapi/schemas/processOffering.yaml
    8581schema=https://raw.githubusercontent.com/opengeospatial/wps-rest-binding/master/core/openapi/schemas/process.yaml
    8682parameters=/components/parameters/id
Note: See TracChangeset for help on using the changeset viewer.

Search

Context Navigation

ZOO Sponsors

http://www.zoo-project.org/trac/chrome/site/img/geolabs-logo.pnghttp://www.zoo-project.org/trac/chrome/site/img/neogeo-logo.png http://www.zoo-project.org/trac/chrome/site/img/apptech-logo.png http://www.zoo-project.org/trac/chrome/site/img/3liz-logo.png http://www.zoo-project.org/trac/chrome/site/img/gateway-logo.png

Become a sponsor !

Knowledge partners

http://www.zoo-project.org/trac/chrome/site/img/ocu-logo.png http://www.zoo-project.org/trac/chrome/site/img/gucas-logo.png http://www.zoo-project.org/trac/chrome/site/img/polimi-logo.png http://www.zoo-project.org/trac/chrome/site/img/fem-logo.png http://www.zoo-project.org/trac/chrome/site/img/supsi-logo.png http://www.zoo-project.org/trac/chrome/site/img/cumtb-logo.png

Become a knowledge partner

Related links

http://zoo-project.org/img/ogclogo.png http://zoo-project.org/img/osgeologo.png