Back to list
bitsoex

rest-api

by bitsoex

Bitso Java API Wrapper

34🍴 30📅 Jan 24, 2026

SKILL.md


name: rest-api description: > REST API standards for Java Spring services. Covers Bitso API guidelines, authentication integration, OpenAPI documentation, and RFC-37 service documentation. Use when creating or maintaining REST endpoints. compatibility: Java projects using Spring Boot with REST APIs metadata: version: "1.0.0" technology: java category: infrastructure tags: - java - rest-api - rfc-37 - openapi - authentication

REST API

REST API standards for Java Spring services.

When to use this skill

  • Creating REST endpoints in Spring services
  • Integrating Bitso authentication
  • Documenting APIs with OpenAPI
  • Setting up service documentation (RFC-37)
  • Testing authenticated endpoints

Skill Contents

Sections

Available Resources

📚 references/ - Detailed documentation


Quick Start

1. Add Authentication Dependency

implementation libs.bitso.api.base.spring.webapi

2. Configure gRPC Client

grpc:
  client:
    user-security:
      address: dns:/${USER_SECURITY_HOST:localhost}:${GRPC_PORT:8201}
      negotiation-type: PLAINTEXT

3. Create Controller

@RestController
@RequestMapping("/")
public class MyController {

    @Autowired
    SpringHttpResponseFactory responseFactory;

    @Autowired
    WebAuthenticationContext authenticationContext;

    @GetMapping("/private")
    @WebAPI(WebAPIType.PRIVATE)
    public ResponseEntity<?> privateEndpoint() {
        Long userId = authenticationContext.getPrincipalId();
        return responseFactory.ok(userId);
    }
}

Authentication

Configuration Bean

@Configuration
public class UserSecurityContextConfiguration {
    @Bean
    @Primary
    public AuthenticationService authenticationService(
        @GrpcClient("user-security") AuthorizationServiceV1BlockingStub stub,
        @Qualifier("userSecurityResilienceConfig") ResilienceConfiguration config
    ) {
        return new ProtoShimAuthenticationService(config, stub);
    }
}

Component Scan

Ensure your main application scans Bitso components:

@SpringBootApplication
@ComponentScan("com.bitso.*")
public class MyApplication {
    public static void main(String[] args) {
        SpringApplication.run(MyApplication.class, args);
    }
}

Documentation

OpenAPI Specification

All endpoints should be documented under ./docs/api/rest/openapi.yaml

RFC-37 Documentation Structure

docs/
├── api/
│   ├── async/
│   ├── grpc/
│   └── rest/
├── decisions/
├── <domain-name>/
├── runbooks/
└── how-tos/
    └── local-execution.md

References

ReferenceDescription
references/guidelines.mdAPI guidelines, authentication, testing
references/documentation.mdRFC-37 documentation standards
  • .cursor/rules/java-rest-api-guidelines.mdc - Full API guidelines
  • .cursor/rules/java-service-documentation.mdc - RFC-37 documentation
SkillPurpose
grpc-standardsgRPC service standards
java-testingTesting REST endpoints

Score

Total Score

65/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

+5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon