小编Pao*_*.nl的帖子

你如何在Node/Express应用程序中处理api版本

我是Node.js的新手,我面临以下问题.

我的中间件以链接api/v1/login和一堆端点开始.然后api/v1.1介绍了另外两个端点.api/v1.2现在是最后一个,并获得了一些新的终点.

我该如何以有效的方式处理这个api版本?如何从可用于下一版本的版本中创建端点?

versioning api node.js express

31
推荐指数
2
解决办法
2万
查看次数

需要理解这个警告"方法实现的属性及其声明必须匹配"

我有一个UIView子类用作自定义警报视图,它声明了这个init方法

@interface THAlertView : UIView   
- (id) initWithTitle:(NSString *)title message:(NSString *)message
    cancelButtonTitle:(NSString*)cancelButtonTitle
    otherButtonTitles:(NSString*)otherButtonTitles, ... NS_REQUIRES_NIL_TERMINATION;
@end
Run Code Online (Sandbox Code Playgroud)

在实现文件中,我只是定义该方法

@implementation THAlertView

- (id) initWithTitle:(NSString *)title message:(NSString *)message
   cancelButtonTitle:(NSString*)cancelButtonTitle
   otherButtonTitles:(NSString*)otherButtonTitles, ... NS_REQUIRES_NIL_TERMINATION {

// Create and return an instance of THAlertView

}
Run Code Online (Sandbox Code Playgroud)

带有LLVM 4.2的XCode 4.6.3给了我这个警告

THAlertView.m:74:193: warning: attributes on method implementation and its declaration must match [-Wmismatched-method-attributes]
- (id)initWithTitle:(NSString *)title message:(NSString *)message cancelButtonTitle:(NSString*)cancelButtonTitle otherButtonTitles:(NSString*)otherButtonTitles, ... NS_REQUIRES_NIL_TERMINATION {
                                                                                                                                                                                               ^
THAlertView.h:29:1: note: method 'initWithTitle:message:cancelButtonTitle:otherButtonTitles:' declared here
- (id)initWithTitle:(NSString *)title message:(NSString *)message cancelButtonTitle:(NSString*)cancelButtonTitle otherButtonTitles:(NSString*)otherButtonTitles, ... NS_REQUIRES_NIL_TERMINATION; …
Run Code Online (Sandbox Code Playgroud)

llvm compiler-warnings ios

2
推荐指数
1
解决办法
464
查看次数

标签 统计

api ×1

compiler-warnings ×1

express ×1

ios ×1

llvm ×1

node.js ×1

versioning ×1