Skip to content

config schema incorrectly states that process manager connection must be a string #2157

@C-Loftus

Description

@C-Loftus

In the docs for the postgresql manager it states the connection must include multiple properties like the password and username

This makes sense and works as expected, but if you run pygeoapi config validate --config pygeoapi.config.yml it causes an error:

jsonschema.exceptions.ValidationError: {'host': '127.0.0.1', 'port': 5432, 'database': 'db', 'user': 'postgres', 'password': 'password'} is not of type 'string'

Failed validating 'type' in schema['properties']['server']['properties']['manager']['properties']['connection']:
    {'type': 'string',
     'description': 'connection info to store jobs (e.g. filepath)'}

On instance['server']['manager']['connection']:
    {'host': '127.0.0.1',
     'port': 5432,
     'database': 'db',
     'user': 'postgres',
     'password': 'password'}

This seems to be due to the fact the the json schema states that the connection must be a string, fails early, and thus prevents config validation on other parts of the config

connection:
type: string
description: connection info to store jobs (e.g. filepath)

(This was produced on pygeoapi, version 0.22.dev0 on MacOS)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions