Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Aug 3, 2024

Conversation

myhau
Copy link
Contributor

@myhau myhau commented Jul 15, 2024

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

@@ -53,8 +53,9 @@ func encodeResponse(ctx context.Context, w http.ResponseWriter, response interfa
}

const (
discoveryAPIEndpoint = "/discovery/v1/apis/bigquery/v2/rest"
uploadAPIEndpoint = "/upload/bigquery/v2/projects/{projectId}/jobs"
discoveryAPIEndpoint = "/discovery/v1/apis/bigquery/v2/rest"
Copy link
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
Copy link
Contributor

ohaibbq commented Aug 2, 2024

This one would be great to get in! @goccy

@pmaoui
Copy link

pmaoui commented Aug 2, 2024

I would really need this too ! :)

@goccy
Copy link
Owner

goccy commented Aug 3, 2024

Thank you for your contribution ! LGTM !

@goccy goccy merged commit dc038eb into goccy:main Aug 3, 2024
4 checks passed
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