chore(coreapi): regenerate client from latest core API spec · Entire
chore(coreapi): regenerate client from latest core API spec
d519375→main·
gtrrz-victor·yesterday·9 files·+1,196 added/-30 removed
Refresh spec/core.openapi.json from the released control-plane contract and re-run ogen. New surface: completeOnboarding endpoint (POST /me/onboarding/complete), nextPageToken pagination on the repo index, and RepoPrimaries/stars fields on repo read models.
Co-Authored-By: Claude Fable 5 noreply@anthropic.com
Changes
9
internal/coreapi
Moas_client_gen.go+141/-2
Moas_json_gen.go+482/-18
Moas_operations_gen.go+1
Moas_parameters_gen.go+7
Moas_response_decoders_gen.go+83
Moas_schemas_gen.go+184/-6
Moas_security_gen.go+2
spec
Mcore.gen.json+123/-2
Mcore.openapi.json+173/-2
38 unmodified lines
...
// CompleteOnboarding invokes completeOnboarding operation.
//
// Record that the calling account completed web onboarding.
//
// POST /me/onboarding/complete
CompleteOnboarding(ctx context.Context) (*CompleteOnboardingOutputBody, error)
// CreateBinding invokes createBinding operation.
//
// Create OIDC binding.
return result, nil
// CompleteOnboarding invokes completeOnboarding operation.
// Record that the calling account completed web onboarding.
// POST /me/onboarding/complete
func (c *Client) CompleteOnboarding(ctx context.Context) (*CompleteOnboardingOutputBody, error) {
res, err := c.sendCompleteOnboarding(ctx)
return res, err
}
// GetOnboardingStatus invokes getOnboardingStatus operation.
//
// Report whether the calling account still needs to onboard (has no mirror yet).
// Report whether the calling account still needs to complete onboarding.
//
// GET /me/onboarding
GetOnboardingStatus(ctx context.Context) (*GetOnboardingStatusOutputBody, error) {
551 unmodified lines
}
// ListReposParams is parameters of listRepos operation.
type ListReposParams struct {
// Maximum entries to return; server may cap further.
PageSize OptInt32 `json:",omitempty,omitzero"`
// Opaque cursor from a previous response's nextPageToken.
PageToken OptString `json:",omitempty,omitzero"`
// Onboarded (default): repos in Entire; all: also include onboardable GitHub candidates.
Scope OptListReposScope `json:",omitempty,omitzero"`
// Optional: exact-match full_name (owner/repo, case-insensitive). Returns that repo's zero-or-one
// entries; pagination and scope are ignored.
Filter OptString `json:",omitempty,omitzero"`
}
// Ref: #/components/schemas/CompleteOnboardingOutputBody
type CompleteOnboardingOutputBody struct {
// A URL to the JSON Schema for this object.
Schema OptURI `json:"$schema"`
// Always false after onboarding completion is recorded.
NeedsOnboarding bool `json:"needsOnboarding"`
AdditionalProps CompleteOnboardingOutputBodyAdditional
}
// GetSchema returns the value of Schema.
func (s *CompleteOnboardingOutputBody) GetSchema() OptURI {
return s.Schema
}
// GetNeedsOnboarding returns the value of NeedsOnboarding.
func (s *CompleteOnboardingOutputBody) GetNeedsOnboarding() bool {
return s.NeedsOnboarding
}
// GetAdditionalProps returns the value of AdditionalProps.
func (s *CompleteOnboardingOutputBody) GetAdditionalProps() CompleteOnboardingOutputBodyAdditional {
return s.AdditionalProps
}
// SetSchema sets the value of Schema.
func (s *CompleteOnboardingOutputBody) SetSchema(val OptURI) {
s.Schema = val
}
// SetNeedsOnboarding sets the value of NeedsOnboarding.
func (s *CompleteOnboardingOutputBody) SetNeedsOnboarding(val bool) {
s.NeedsOnboarding = val
}
// SetAdditionalProps sets the value of AdditionalProps.
func (s *CompleteOnboardingOutputBody) SetAdditionalProps(val CompleteOnboardingOutputBodyAdditional) {
s.AdditionalProps = val
}
// Other relevant sections here
// Decode decodes CompleteOnboardingOutputBody from json.
func (s *CompleteOnboardingOutputBody) Decode(d *jx.Decoder) error {
if s == nil {
return errors.New("invalid: unable to decode CompleteOnboardingOutputBody to nil")
}
var requiredBitSet [1]uint8
s.AdditionalProps = map[string]jx.Raw{}
if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error {
switch string(k) {
case "$schema":
if err := func() error {
s.Schema.Reset()
if err := s.Schema.Decode(d); err != nil {
return err
}
return nil
}(); err != nil {
return errors.Wrap(err, "decode field \"$schema\"")
}
case "needsOnboarding":
requiredBitSet[0] |= 1 << 1
if err := func() error {
v, err := d.Bool()
s.NeedsOnboarding = bool(v)
if err != nil {
return err
}
return nil
}(); err != nil {
return errors.Wrap(err, "decode field \"needsOnboarding\"")
}
default:
var elem jx.Raw
if err := func() error {
v, err := d.RawAppend(nil)
elem = jx.Raw(v)
if err != nil {
return err
}
return nil
}(); err != nil {
return errors.Wrapf(err, "decode field %q", k)
}
s.AdditionalProps[string(k)] = elem
}
return nil
}); err != nil {
return errors.Wrap(err, "decode CompleteOnboardingOutputBody")
}
// Validate required fields.
var failures []validate.FieldError
for i, mask := range [1]uint8{
0b00000010,
} {
if result := (requiredBitSet[i] & mask) ^ mask; result != 0 {
missed := bits.OnesCount8(result)
for bitN := 0; bitN < missed; bitN++ {
bitIdx := bits.TrailingZeros8(result)
fieldIdx := i*8 + bitIdx
var name string
if fieldIdx < len(jsonFieldsNameOfCompleteOnboardingOutputBody) {
name = jsonFieldsNameOfCompleteOnboardingOutputBody[fieldIdx]
} else {
name = strconv.Itoa(fieldIdx)
}
failures = append(failures, validate.FieldError{
Name: name,
Error: validate.ErrFieldRequired,
})
// Reset bit.
result &^= 1 << bitIdx
}
}
}
if len(failures) > 0 {
return &validate.Error{Fields: failures}
}
return nil
}