Skip to content

Add handler for new discovery endpoint so that CLI tools like bq work (fix for #290)#338

Merged
goccy merged 1 commit into
goccy:mainfrom
myhau:fix-discovery-endpoint
Aug 3, 2024
Merged

Add handler for new discovery endpoint so that CLI tools like bq work (fix for #290)#338
goccy merged 1 commit into
goccy:mainfrom
myhau:fix-discovery-endpoint

Conversation

@myhau

@myhau myhau commented Jul 15, 2024

Copy link
Copy Markdown
Contributor

Fixes #290.

How to test:

  1. Compile
make emulator/build
  1. Run
./bigquery-emulator --project test-project
  1. Create and show some dataset through bq
bq --api=http://localhost:9050 --project_id=test-project mk new_dataset
bq --api=http://localhost:9050 --project_id=test-project show new_dataset

Comment thread server/handler.go
const (
discoveryAPIEndpoint = "/discovery/v1/apis/bigquery/v2/rest"
uploadAPIEndpoint = "/upload/bigquery/v2/projects/{projectId}/jobs"
discoveryAPIEndpoint = "/discovery/v1/apis/bigquery/v2/rest"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Not removing that one as old clients might still be using this.

myhau added a commit to myhau/bigquery-emulator that referenced this pull request Jul 15, 2024
…#8)

Related: 

- Issue in the upstream repo: goccy#290
- PR in the upstream repo: goccy#338
@ohaibbq

ohaibbq commented Aug 2, 2024

Copy link
Copy Markdown
Contributor

This one would be great to get in! @goccy

@pmaoui

pmaoui commented Aug 2, 2024

Copy link
Copy Markdown

I would really need this too ! :)

@goccy

goccy commented Aug 3, 2024

Copy link
Copy Markdown
Owner

Thank you for your contribution ! LGTM !

@goccy goccy merged commit dc038eb into goccy:main Aug 3, 2024
ohaibbq referenced this pull request in Recidiviz/bigquery-emulator Jan 21, 2025
iolalla pushed a commit to iolalla/bigquery-emulator that referenced this pull request Aug 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error when executing bq command from google-cloud-cli version 469.0.0

4 participants