Skip to content

Commit

Permalink
Merge branch 'master' into forman-793-update_server_api_docs
Browse files Browse the repository at this point in the history
  • Loading branch information
forman committed Feb 3, 2023
2 parents b129ff6 + 9a82e2c commit 1420211
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ FROM continuumio/miniconda3:${MINICONDA_VERSION}
ARG INSTALL_PLUGINS=1
ARG XCUBE_USER_NAME=xcube
ENV XCUBE_SH_VERSION=latest
ENV XCUBE_CCI_VERSION=0.9.8.dev1
ENV XCUBE_CCI_VERSION=latest
ENV XCUBE_CDS_VERSION=latest
ENV XCUBE_CMEMS_VERSION=latest

# Metadata
LABEL maintainer="[email protected]"
Expand Down Expand Up @@ -54,6 +55,7 @@ ADD scripts/install_xcube.sh ./
RUN if [[ ${INSTALL_PLUGINS} == '1' ]]; then bash install_xcube.sh xcube-sh ${XCUBE_SH_VERSION} release; fi;
RUN if [[ ${INSTALL_PLUGINS} == '1' ]]; then bash install_xcube.sh xcube-cci ${XCUBE_CCI_VERSION} release; fi;
RUN if [[ ${INSTALL_PLUGINS} == '1' ]]; then bash install_xcube.sh xcube-cds ${XCUBE_CDS_VERSION} release; fi;
RUN if [[ ${INSTALL_PLUGINS} == '1' ]]; then bash install_xcube.sh xcube-cmems ${XCUBE_CMEMS_VERSION} release; fi;

# Export web server port
EXPOSE 8080
Expand Down
2 changes: 1 addition & 1 deletion xcube/core/gen2/remote/response.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ def __init__(self, cost_estimation: CostEstimation, **kwargs):
def get_schema(cls) -> JsonObjectSchema:
schema = super().get_schema()
schema.properties.update(cost_estimation=CostEstimation.get_schema())
schema.required.add('cost_estimation')
schema.required.append('cost_estimation')
schema.factory = cls
return schema

Expand Down
6 changes: 3 additions & 3 deletions xcube/server/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,9 +334,9 @@ def _update_config_schema(cls,
f' is already defined.')
config_schema.properties[k] = v
if config_schema_update.required:
config_schema.required.update(
config_schema_update.required
)
for r in config_schema_update.required:
if r not in config_schema.required:
config_schema.required.append(r)

def get_open_api_doc(self, include_all: bool = False) -> Dict[str, Any]:
"""Get the OpenAPI JSON document for this server."""
Expand Down
2 changes: 1 addition & 1 deletion xcube/util/jsonschema.py
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ def __init__(self,
self.additional_properties = additional_properties
self.min_properties = min_properties
self.max_properties = max_properties
self.required = set(required) if required else set()
self.required = list(required) if required else []
self.dependencies = dict(dependencies) if dependencies else None

def to_dict(self) -> Dict[str, Any]:
Expand Down

0 comments on commit 1420211

Please sign in to comment.