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

Generate go-client from swagger #2691

Closed
wants to merge 20 commits into from

Conversation

anbraten
Copy link
Member

@anbraten anbraten commented Nov 1, 2023

close #3053
close #3652

Creates a new go api client automatically out of the swagger definition

@anbraten anbraten added breaking will break existing installations if no manual action happens enhancement improve existing features labels Nov 1, 2023
@runephilosof-karnovgroup
Copy link
Contributor

Won't this type int or 'latest' be a problem?
https://github.com/woodpecker-ci/woodpecker/blob/main/server/api/pipeline.go#L126

Should it be changed to something like?

//	@Param		number		path	int|string		true	"the number of the pipeline, OR 'latest'"

@runephilosof-karnovgroup
Copy link
Contributor

The current client does takes int instead of int64 as arguments for repo_id and pipeline number etc.
It should take int64, how will this generated client know to take int64 arguments?

@qwerty287
Copy link
Contributor

@anbraten Can we close this and convert to an issue instead? There hasn't really been any work

@anbraten anbraten closed this Dec 28, 2023
@qwerty287 qwerty287 mentioned this pull request Dec 28, 2023
4 tasks
@anbraten anbraten changed the title Generate swagger client Generate go-client from swagger Jun 3, 2024
@anbraten anbraten reopened this Jun 3, 2024
@anbraten anbraten removed the breaking will break existing installations if no manual action happens label Jun 3, 2024
@anbraten anbraten added this to the 3.0.0 milestone Jul 25, 2024
@qwerty287 qwerty287 added the breaking will break existing installations if no manual action happens label Aug 7, 2024
@woodpecker-bot
Copy link
Contributor

woodpecker-bot commented Nov 6, 2024

Deployment of preview was torn down

@anbraten anbraten mentioned this pull request Nov 22, 2024
4 tasks
func (c *Client) StreamPipelineStepLog(ctx context.Context, repoID, pipelineNumber, stepID int64) error {
logs := make(chan *sse.Event)

client := sse.NewClient(fmt.Sprintf("%s/api/stream/logs/%d/%d/%d", c.uri, repoID, pipelineNumber, stepID))
Copy link
Member

Choose a reason for hiding this comment

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

how is the logs chan exposed ?

@pat-s pat-s removed this from the 3.0.0 milestone Dec 2, 2024
@xoxys xoxys closed this Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking will break existing installations if no manual action happens enhancement improve existing features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Generate sdk from swagger
7 participants