Skip to content

Conversation

@kbendick
Copy link
Contributor

The REST catalog receives some of its configuration from the server.

This updates the REST Catalog spec to show:

  1. type of object for both overrides and properties is a string-to-string map (the additionalProperties: { type: string } indicates this).
  2. that these maps have unique items
  3. Provide a default value and an example value, in-line in the schema spec.

This does not change anything about the spec, just provides more detail.

See also #4184 which adds in a response object for this type.

@github-actions github-actions bot added the docs label Feb 22, 2022
@kbendick
Copy link
Contributor Author

cc @rdblue. I was working on this PR for RESTCatalogConfiguration and I noticed that this schema in the rest open-api doc didn't have examples or the additionalProperties weirdness that indicates that it's an arbitrary string-to-string map. So I added them. #4184

This isn't doesn't change the spec at all. I'll also update the response to match the name RESTCatalogConfigResponse.

@kbendick
Copy link
Contributor Author

This passes based on editor.swagger.io and openapi-schema-validator

$ openapi-spec-validator docs/rest/rest-catalog-open-api.yaml
OK

@kbendick kbendick force-pushed the update-rest-catalog-config-openapi-doc branch from f063af3 to e059033 Compare February 22, 2022 05:39
}
}
}
$ref: '#/components/responses/RESTCatalogConfigResponse'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is clear that all the request/response objects are for REST, so we can probably omit that from the example and object names.

example: 404

CatalogConfiguration:
RESTCatalogConfig:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this rename?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This matches the values that are used. Although now we just have RESTCatalogConfigResponse.

@kbendick kbendick force-pushed the update-rest-catalog-config-openapi-doc branch from e059033 to ce7e6c2 Compare April 4, 2022 22:38
@kbendick
Copy link
Contributor Author

kbendick commented Apr 4, 2022

Here's the output config example when putting this into editor.swagger.io

image

content:
application/json:
schema:
$ref: '#/components/schemas/RESTCatalogConfig'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will probably update to inline this and get rid of the RESTCatalogConfig object.

properties:
overrides:
type: object
items:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this valid? I thought it additionalProperties was used to set the type of values in a map/object.

description:
Properties that should be used to override client configuration; applied after defaults and client configuration.
example: { "warehouse": "s3://bucket/warehouse" }
default: { }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't use defaults elsewhere. is this needed?


RESTCatalogConfigResponse:
description:
Configuration from the server consists of two sets of key/value pairs.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought that you needed 2 newlines between paragraphs, and that * didn't work for bulleted lists.

@github-actions
Copy link

github-actions bot commented Aug 7, 2024

This pull request has been marked as stale due to 30 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the [email protected] list. Thank you for your contributions.

@github-actions github-actions bot added the stale label Aug 7, 2024
@github-actions
Copy link

This pull request has been closed due to lack of activity. This is not a judgement on the merit of the PR in any way. It is just a way of keeping the PR queue manageable. If you think that is incorrect, or the pull request requires review, you can revive the PR at any time.

@github-actions github-actions bot closed this Aug 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants